Views
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<!--Create a new Extra Right group that can read, create, and edit the "Child" level (individual) contacts of "Parent" level (company) contacts, but only read the parent level contacts.--> | |
<odoo noupdate="1"> | |
<record id="group_child_contact_creator" model="res.groups"><!--create record fo this new group--> | |
<field name="name">Child Contact Creation</field><!--name this group--> | |
<field name="category_id" | |
ref="base.module_category_usability"/><!--assign this group to Extra Rights Category--> | |
<field name="implied_ids" | |
eval="[(4, ref('base.group_user'))]"/><!--assign this group to base users--> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from odoo import fields, models | |
class Partner(models.Model): | |
_inherit = "res.partner" | |
def name_get(self): | |
orig_res = super().name_get() | |
# orig_names = {rec_id: rec_name for rec_id, rec_name in orig_res} | |
orig_names = dict(orig_res) # even simpler |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import itertools | |
def freqs_calc(calc_func, dice): | |
combs = itertools.product(*tuple(dice)) | |
res = dict() | |
for comb in combs: | |
#import pdb; pdb.set_trace() | |
x = calc_func(*comb) | |
res.setdefault(x, 0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sharing code and business experiences | |
Help make quality/reliable modules | |
Work with the best of the best | |
Open Source | |
the focus on quality; getting things done with people from all around the world | |
Quality, Involvement of "leading members", expertise, Pedro ;-) | |
The opensource and non-profitable origin is by far the most satisfying aspect. | |
Feedback on contributions | |
The quality of the code found. | |
Quality of addons and maintancr |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*- | |
"""Funções para validar números de bilhete de identidade, | |
contribuinte, identificação bancária, segurança social, | |
cartão de crédito e ISBN. | |
Segundo contribuição de _kk_, B.Baixo, Jorge Buescu, | |
Michael Gilleland (Merriam Park Software), Filipe Polido, | |
Jeremy Bradbury e Hugo Pires (DRI/DRO, IIESS). | |
Estas rotinas são do dominio público (sem copyright). |
Odoo has native Analytic Accounting support through Anaytic Accounts. Documents, such as Sales Orders or Invoices, can have Analytic Accounts on them. These are carried to the GL Accounting moves, so that finantial data ends up with analytic informatin available for management analysis.
What are Analytic Accounts is a business decision, and depends on what needs to be measured. These can be Activities, Contracts, Projects, Cost Centers, etc.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
#%# family=manual | |
#%# capabilities=autoconf suggest | |
# Munin plugin for transactions/minute | |
case $1 in | |
autoconf) | |
exit 0 | |
;; | |
suggest) |
Use Odoo CLI commands. Work dir is the one for the current odoo.py.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Setup: | |
Assuming Odoo 8.0 sources at ~/odoo: | |
$ cp odoo-sh.py ~/odoo | |
$ cd ~/odoo | |
$ python -i odoo-sh.py | |
Usage example: | |
>>> env = connect('my-db-name') | |
>>> Users = env['res.users'] |
NewerOlder