~sebastien.beau/openobject-addons/on-change-support-extra-addons

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
import time
import netsvc
from osv import fields, osv

#----------------------------------------------------------
# Products
#----------------------------------------------------------
class product_template(osv.osv):
    _inherit = "product.template"
    _columns = {
        'taxes_id': fields.many2many('account.tax', 'product_taxes_rel', 'prod_id', 'tax_id', 'Product Taxes', domain=[('parent_id','=',False)]),

        'property_account_income_europe': fields.property(
          'account.account',
          type='many2one',
          relation='account.account',
          string="Income Account for Europe",
          method=True,
          view_load=True,
          group_name="Accounting Properties",
          help="This account will be used, instead of the default one, to value incoming stock for the current product"),

        'property_account_expense_europe': fields.property(
          'account.account',
          type='many2one',
          relation='account.account',
          string="Expense Account for Europe",
          method=True,
          view_load=True,
          group_name="Accounting Properties",
          help="This account will be used, instead of the default one, to value outgoing stock for the current product"),

        'property_account_income_world': fields.property(
          'account.account',
          type='many2one',
          relation='account.account',
          string="Outside Europe Income Account",
          method=True,
          view_load=True,
          group_name="Accounting Properties",
          help="This account will be used, instead of the default one, to value incoming stock for the current product"),

        'property_account_expense_world1': fields.property(
          'account.account',
          type='many2one',
          relation='account.account',
          string="Outside Europe Expense Account",
          method=True,
          view_load=True,
          group_name="Accounting Properties",
          help="This account will be used, instead of the default one, to value outgoing stock for the current product"),
    }

#end class
product_template()


class product_category(osv.osv):
    _inherit = "product.category"
    _columns = {

        'property_account_income_europe': fields.property(
          'account.account',
          type='many2one',
          relation='account.account',
          string="Income Account for Europe",
          method=True,
          view_load=True,
          group_name="Accounting Properties",
          help="This account will be used, instead of the default one, to value incoming stock for the current product"),

        'property_account_expense_europe': fields.property(
          'account.account',
          type='many2one',
          relation='account.account',
          string="Expense Account for Europe",
          method=True,
          view_load=True,
          group_name="Accounting Properties",
          help="This account will be used, instead of the default one, to value outgoing stock for the current product"),

        'property_account_income_world': fields.property(
          'account.account',
          type='many2one',
          relation='account.account',
          string="Outside Europe Income Account",
          method=True,
          view_load=True,
          group_name="Accounting Properties",
          help="This account will be used, instead of the default one, to value incoming stock for the current product"),

        'property_account_expense_world': fields.property(
          'account.account',
          type='many2one',
          relation='account.account',
          string="Outside Europe Expense Account",
          method=True,
          view_load=True,
          group_name="Accounting Properties",
          help="This account will be used, instead of the default one, to value outgoing stock for the current product"),
    }
#end class
product_category()