Skip to content

Commit d856e83

Browse files
author
Quentin (OpenERP)
committed
[REF] *: change linked to server revision 4907. Removed deprecated 'view_load' attribute + removed duplicated first argument of property fields which is replaced with 'relation' argument in case where it is really needed (relational fields): indeed this first argument was totally useless for property of float type (for example).
bzr revid: [email protected]
1 parent 7e8e2ca commit d856e83

File tree

11 files changed

+24
-68
lines changed

11 files changed

+24
-68
lines changed

addons/account/partner.py

-10
Original file line numberDiff line numberDiff line change
@@ -189,44 +189,34 @@ def mark_as_reconciled(self, cr, uid, ids, context=None):
189189
'debit': fields.function(_credit_debit_get, fnct_search=_debit_search, string='Total Payable', multi='dc', help="Total amount you have to pay to this supplier."),
190190
'debit_limit': fields.float('Payable Limit'),
191191
'property_account_payable': fields.property(
192-
'account.account',
193192
type='many2one',
194193
relation='account.account',
195194
string="Account Payable",
196-
view_load=True,
197195
domain="[('type', '=', 'payable')]",
198196
help="This account will be used instead of the default one as the payable account for the current partner",
199197
required=True),
200198
'property_account_receivable': fields.property(
201-
'account.account',
202199
type='many2one',
203200
relation='account.account',
204201
string="Account Receivable",
205-
view_load=True,
206202
domain="[('type', '=', 'receivable')]",
207203
help="This account will be used instead of the default one as the receivable account for the current partner",
208204
required=True),
209205
'property_account_position': fields.property(
210-
'account.fiscal.position',
211206
type='many2one',
212207
relation='account.fiscal.position',
213208
string="Fiscal Position",
214-
view_load=True,
215209
help="The fiscal position will determine taxes and accounts used for the partner.",
216210
),
217211
'property_payment_term': fields.property(
218-
'account.payment.term',
219212
type='many2one',
220213
relation='account.payment.term',
221214
string ='Customer Payment Term',
222-
view_load=True,
223215
help="This payment term will be used instead of the default one for sale orders and customer invoices"),
224216
'property_supplier_payment_term': fields.property(
225-
'account.payment.term',
226217
type='many2one',
227218
relation='account.payment.term',
228219
string ='Supplier Payment Term',
229-
view_load=True,
230220
help="This payment term will be used instead of the default one for purchase orders and supplier invoices"),
231221
'ref_companies': fields.one2many('res.company', 'partner_id',
232222
'Companies that refers to partner'),

addons/account/product.py

-8
Original file line numberDiff line numberDiff line change
@@ -25,18 +25,14 @@ class product_category(osv.osv):
2525
_inherit = "product.category"
2626
_columns = {
2727
'property_account_income_categ': fields.property(
28-
'account.account',
2928
type='many2one',
3029
relation='account.account',
3130
string="Income Account",
32-
view_load=True,
3331
help="This account will be used for invoices to value sales."),
3432
'property_account_expense_categ': fields.property(
35-
'account.account',
3633
type='many2one',
3734
relation='account.account',
3835
string="Expense Account",
39-
view_load=True,
4036
help="This account will be used for invoices to value expenses."),
4137
}
4238

@@ -54,18 +50,14 @@ class product_template(osv.osv):
5450
'product_supplier_taxes_rel', 'prod_id', 'tax_id',
5551
'Supplier Taxes', domain=[('parent_id', '=', False),('type_tax_use','in',['purchase','all'])]),
5652
'property_account_income': fields.property(
57-
'account.account',
5853
type='many2one',
5954
relation='account.account',
6055
string="Income Account",
61-
view_load=True,
6256
help="This account will be used for invoices instead of the default one to value sales for the current product."),
6357
'property_account_expense': fields.property(
64-
'account.account',
6558
type='many2one',
6659
relation='account.account',
6760
string="Expense Account",
68-
view_load=True,
6961
help="This account will be used for invoices instead of the default one to value expenses for the current product."),
7062
}
7163

addons/account_anglo_saxon/product.py

-12
Original file line numberDiff line numberDiff line change
@@ -24,27 +24,21 @@ class product_category(osv.osv):
2424
_inherit = "product.category"
2525
_columns = {
2626
'property_account_creditor_price_difference_categ': fields.property(
27-
'account.account',
2827
type='many2one',
2928
relation='account.account',
3029
string="Price Difference Account",
31-
view_load=True,
3230
help="This account will be used to value price difference between purchase price and cost price."),
3331

3432
#Redefine fields to change help text for anglo saxon methodology.
3533
'property_account_income_categ': fields.property(
36-
'account.account',
3734
type='many2one',
3835
relation='account.account',
3936
string="Income Account",
40-
view_load=True,
4137
help="This account will be used to value outgoing stock using sale price."),
4238
'property_account_expense_categ': fields.property(
43-
'account.account',
4439
type='many2one',
4540
relation='account.account',
4641
string="Expense Account",
47-
view_load=True,
4842
help="This account will be used to value outgoing stock using cost price."),
4943

5044
}
@@ -53,27 +47,21 @@ class product_template(osv.osv):
5347
_inherit = "product.template"
5448
_columns = {
5549
'property_account_creditor_price_difference': fields.property(
56-
'account.account',
5750
type='many2one',
5851
relation='account.account',
5952
string="Price Difference Account",
60-
view_load=True,
6153
help="This account will be used to value price difference between purchase price and cost price."),
6254

6355
#Redefine fields to change help text for anglo saxon methodology.
6456
'property_account_income': fields.property(
65-
'account.account',
6657
type='many2one',
6758
relation='account.account',
6859
string="Income Account",
69-
view_load=True,
7060
help="This account will be used to value outgoing stock using sale price."),
7161
'property_account_expense': fields.property(
72-
'account.account',
7362
type='many2one',
7463
relation='account.account',
7564
string="Expense Account",
76-
view_load=True,
7765
help="This account will be used to value outgoing stock using cost price."),
7866

7967
}

addons/delivery/partner.py

-2
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,9 @@ class res_partner(osv.osv):
2525
_inherit = 'res.partner'
2626
_columns = {
2727
'property_delivery_carrier': fields.property(
28-
'delivery.carrier',
2928
type='many2one',
3029
relation='delivery.carrier',
3130
string="Delivery Method",
32-
view_load=True,
3331
help="This delivery method will be used when invoicing from picking."),
3432
}
3533

addons/product/partner.py

-2
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,10 @@ class res_partner(osv.osv):
2727
_inherit = 'res.partner'
2828
_columns = {
2929
'property_product_pricelist': fields.property(
30-
'product.pricelist',
3130
type='many2one',
3231
relation='product.pricelist',
3332
domain=[('type','=','sale')],
3433
string="Sale Pricelist",
35-
view_load=True,
3634
help="This pricelist will be used, instead of the default one, for sales to the current partner"),
3735
}
3836

addons/product/product.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ class product_template(osv.osv):
321321
'uom_id': fields.many2one('product.uom', 'Unit of Measure', required=True, help="Default Unit of Measure used for all stock operation."),
322322
'uom_po_id': fields.many2one('product.uom', 'Purchase Unit of Measure', required=True, help="Default Unit of Measure used for purchase orders. It must be in the same category than the default unit of measure."),
323323
'uos_id' : fields.many2one('product.uom', 'Unit of Sale',
324-
help='Sepcify a unit of measure here if invoicing is made in another unit of measure than inventory. Keep empty to use the default unit of measure.'),
324+
help='Specify a unit of measure here if invoicing is made in another unit of measure than inventory. Keep empty to use the default unit of measure.'),
325325
'uos_coeff': fields.float('Unit of Measure -> UOS Coeff', digits_compute= dp.get_precision('Product UoS'),
326326
help='Coefficient to convert default Unit of Measure to Unit of Sale\n'
327327
' uos = uom * coeff'),

addons/purchase/partner.py

-2
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,10 @@ def _commercial_fields(self, cr, uid, context=None):
4848

4949
_columns = {
5050
'property_product_pricelist_purchase': fields.property(
51-
'product.pricelist',
5251
type='many2one',
5352
relation='product.pricelist',
5453
domain=[('type','=','purchase')],
5554
string="Purchase Pricelist",
56-
view_load=True,
5755
help="This pricelist will be used, instead of the default one, for purchases from the current partner"),
5856
'purchase_order_count': fields.function(_purchase_order_count, string='# of Purchase Order', type='integer'),
5957
'purchase_order_ids': fields.one2many('purchase.order','partner_id','Purchase Order')

addons/report_webkit/ir_report.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,10 @@
3737
class ir_actions_report_xml(orm.Model):
3838
_inherit = 'ir.actions.report.xml'
3939
_columns = {
40-
'webkit_header': fields.property('ir.header_webkit',
40+
'webkit_header': fields.property(
4141
type='many2one', relation='ir.header_webkit',
4242
string='Webkit Header', help="The header linked to the report",
43-
view_load=True, required=True),
43+
required=True),
4444
'webkit_debug': fields.boolean('Webkit debug',
4545
help="Enable the webkit engine debugger"),
4646
'report_webkit_data': fields.text('Webkit Template',

addons/sale_journal/sale_journal.py

-2
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,9 @@ class res_partner(osv.osv):
4343
_inherit = 'res.partner'
4444
_columns = {
4545
'property_invoice_type': fields.property(
46-
'sale_journal.invoice.type',
4746
type = 'many2one',
4847
relation = 'sale_journal.invoice.type',
4948
string = "Invoicing Type",
50-
view_load = True,
5149
group_name = "Accounting Properties",
5250
help = "This invoicing type will be used, by default, to invoice the current partner."),
5351
}

addons/stock/partner.py

-4
Original file line numberDiff line numberDiff line change
@@ -25,19 +25,15 @@ class res_partner(osv.osv):
2525
_inherit = 'res.partner'
2626
_columns = {
2727
'property_stock_customer': fields.property(
28-
'stock.location',
2928
type='many2one',
3029
relation='stock.location',
3130
string="Customer Location",
32-
view_load=True,
3331
help="This stock location will be used, instead of the default one, as the destination location for goods you send to this partner"),
3432

3533
'property_stock_supplier': fields.property(
36-
'stock.location',
3734
type='many2one',
3835
relation='stock.location',
3936
string="Supplier Location",
40-
view_load=True,
4137
help="This stock location will be used, instead of the default one, as the source location for goods you receive from the current partner"),
4238
}
4339

addons/stock/product.py

+21-23
Original file line numberDiff line numberDiff line change
@@ -477,37 +477,33 @@ class product_template(osv.osv):
477477
_inherit = 'product.template'
478478
_columns = {
479479
'property_stock_procurement': fields.property(
480-
'stock.location',
481480
type='many2one',
482481
relation='stock.location',
483482
string="Procurement Location",
484-
view_load=True,
485483
domain=[('usage','like','procurement')],
486484
help="This stock location will be used, instead of the default one, as the source location for stock moves generated by procurements."),
487485
'property_stock_production': fields.property(
488-
'stock.location',
489486
type='many2one',
490487
relation='stock.location',
491488
string="Production Location",
492-
view_load=True,
493489
domain=[('usage','like','production')],
494490
help="This stock location will be used, instead of the default one, as the source location for stock moves generated by manufacturing orders."),
495491
'property_stock_inventory': fields.property(
496-
'stock.location',
497492
type='many2one',
498493
relation='stock.location',
499494
string="Inventory Location",
500-
view_load=True,
501495
domain=[('usage','like','inventory')],
502496
help="This stock location will be used, instead of the default one, as the source location for stock moves generated when you do an inventory."),
503-
'property_stock_account_input': fields.property('account.account',
504-
type='many2one', relation='account.account',
505-
string='Stock Input Account', view_load=True,
497+
'property_stock_account_input': fields.property(
498+
type='many2one',
499+
relation='account.account',
500+
string='Stock Input Account',
506501
help="When doing real-time inventory valuation, counterpart journal items for all incoming stock moves will be posted in this account, unless "
507502
"there is a specific valuation account set on the source location. When not set on the product, the one from the product category is used."),
508-
'property_stock_account_output': fields.property('account.account',
509-
type='many2one', relation='account.account',
510-
string='Stock Output Account', view_load=True,
503+
'property_stock_account_output': fields.property(
504+
type='many2one',
505+
relation='account.account',
506+
string='Stock Output Account',
511507
help="When doing real-time inventory valuation, counterpart journal items for all outgoing stock moves will be posted in this account, unless "
512508
"there is a specific valuation account set on the destination location. When not set on the product, the one from the product category is used."),
513509
'sale_delay': fields.float('Customer Lead Time', help="The average delay in days between the confirmation of the customer order and the delivery of the finished products. It's the time you promise to your customers."),
@@ -524,27 +520,29 @@ class product_category(osv.osv):
524520

525521
_inherit = 'product.category'
526522
_columns = {
527-
'property_stock_journal': fields.property('account.journal',
528-
relation='account.journal', type='many2one',
529-
string='Stock Journal', view_load=True,
523+
'property_stock_journal': fields.property(
524+
relation='account.journal',
525+
type='many2one',
526+
string='Stock Journal',
530527
help="When doing real-time inventory valuation, this is the Accounting Journal in which entries will be automatically posted when stock moves are processed."),
531-
'property_stock_account_input_categ': fields.property('account.account',
532-
type='many2one', relation='account.account',
533-
string='Stock Input Account', view_load=True,
528+
'property_stock_account_input_categ': fields.property(
529+
type='many2one',
530+
relation='account.account',
531+
string='Stock Input Account',
534532
help="When doing real-time inventory valuation, counterpart journal items for all incoming stock moves will be posted in this account, unless "
535533
"there is a specific valuation account set on the source location. This is the default value for all products in this category. It "
536534
"can also directly be set on each product"),
537-
'property_stock_account_output_categ': fields.property('account.account',
538-
type='many2one', relation='account.account',
539-
string='Stock Output Account', view_load=True,
535+
'property_stock_account_output_categ': fields.property(
536+
type='many2one',
537+
relation='account.account',
538+
string='Stock Output Account',
540539
help="When doing real-time inventory valuation, counterpart journal items for all outgoing stock moves will be posted in this account, unless "
541540
"there is a specific valuation account set on the destination location. This is the default value for all products in this category. It "
542541
"can also directly be set on each product"),
543-
'property_stock_valuation_account_id': fields.property('account.account',
542+
'property_stock_valuation_account_id': fields.property(
544543
type='many2one',
545544
relation='account.account',
546545
string="Stock Valuation Account",
547-
view_load=True,
548546
help="When real-time inventory valuation is enabled on a product, this account will hold the current value of the products.",),
549547
}
550548

0 commit comments

Comments
 (0)