[REF] *: removed useless attributes on definition of property fields (first attribute, because duplicated in 'relation' kwarg, and 'view_load' attribute because it has been deprecated) accordingly to revision qdp-launchpad@openerp.com-20130516152946-s3chj5i05lkf30yk of server.

bzr revid: qdp-launchpad@openerp.com-20130517075245-udn5hug8yq2d1ezc
This commit is contained in:
Quentin (OpenERP) 2013-05-17 09:52:45 +02:00
parent 3d0da85306
commit e42186bd60
11 changed files with 27 additions and 71 deletions

View File

@ -189,44 +189,34 @@ class res_partner(osv.osv):
'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."), '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."),
'debit_limit': fields.float('Payable Limit'), 'debit_limit': fields.float('Payable Limit'),
'property_account_payable': fields.property( 'property_account_payable': fields.property(
'account.account',
type='many2one', type='many2one',
relation='account.account', relation='account.account',
string="Account Payable", string="Account Payable",
view_load=True,
domain="[('type', '=', 'payable')]", domain="[('type', '=', 'payable')]",
help="This account will be used instead of the default one as the payable account for the current partner", help="This account will be used instead of the default one as the payable account for the current partner",
required=True), required=True),
'property_account_receivable': fields.property( 'property_account_receivable': fields.property(
'account.account',
type='many2one', type='many2one',
relation='account.account', relation='account.account',
string="Account Receivable", string="Account Receivable",
view_load=True,
domain="[('type', '=', 'receivable')]", domain="[('type', '=', 'receivable')]",
help="This account will be used instead of the default one as the receivable account for the current partner", help="This account will be used instead of the default one as the receivable account for the current partner",
required=True), required=True),
'property_account_position': fields.property( 'property_account_position': fields.property(
'account.fiscal.position',
type='many2one', type='many2one',
relation='account.fiscal.position', relation='account.fiscal.position',
string="Fiscal Position", string="Fiscal Position",
view_load=True,
help="The fiscal position will determine taxes and accounts used for the partner.", help="The fiscal position will determine taxes and accounts used for the partner.",
), ),
'property_payment_term': fields.property( 'property_payment_term': fields.property(
'account.payment.term',
type='many2one', type='many2one',
relation='account.payment.term', relation='account.payment.term',
string ='Customer Payment Term', string ='Customer Payment Term',
view_load=True,
help="This payment term will be used instead of the default one for sale orders and customer invoices"), help="This payment term will be used instead of the default one for sale orders and customer invoices"),
'property_supplier_payment_term': fields.property( 'property_supplier_payment_term': fields.property(
'account.payment.term',
type='many2one', type='many2one',
relation='account.payment.term', relation='account.payment.term',
string ='Supplier Payment Term', string ='Supplier Payment Term',
view_load=True,
help="This payment term will be used instead of the default one for purchase orders and supplier invoices"), help="This payment term will be used instead of the default one for purchase orders and supplier invoices"),
'ref_companies': fields.one2many('res.company', 'partner_id', 'ref_companies': fields.one2many('res.company', 'partner_id',
'Companies that refers to partner'), 'Companies that refers to partner'),

View File

@ -25,18 +25,14 @@ class product_category(osv.osv):
_inherit = "product.category" _inherit = "product.category"
_columns = { _columns = {
'property_account_income_categ': fields.property( 'property_account_income_categ': fields.property(
'account.account',
type='many2one', type='many2one',
relation='account.account', relation='account.account',
string="Income Account", string="Income Account",
view_load=True,
help="This account will be used for invoices to value sales."), help="This account will be used for invoices to value sales."),
'property_account_expense_categ': fields.property( 'property_account_expense_categ': fields.property(
'account.account',
type='many2one', type='many2one',
relation='account.account', relation='account.account',
string="Expense Account", string="Expense Account",
view_load=True,
help="This account will be used for invoices to value expenses."), help="This account will be used for invoices to value expenses."),
} }
@ -54,18 +50,14 @@ class product_template(osv.osv):
'product_supplier_taxes_rel', 'prod_id', 'tax_id', 'product_supplier_taxes_rel', 'prod_id', 'tax_id',
'Supplier Taxes', domain=[('parent_id', '=', False),('type_tax_use','in',['purchase','all'])]), 'Supplier Taxes', domain=[('parent_id', '=', False),('type_tax_use','in',['purchase','all'])]),
'property_account_income': fields.property( 'property_account_income': fields.property(
'account.account',
type='many2one', type='many2one',
relation='account.account', relation='account.account',
string="Income Account", string="Income Account",
view_load=True,
help="This account will be used for invoices instead of the default one to value sales for the current product."), help="This account will be used for invoices instead of the default one to value sales for the current product."),
'property_account_expense': fields.property( 'property_account_expense': fields.property(
'account.account',
type='many2one', type='many2one',
relation='account.account', relation='account.account',
string="Expense Account", string="Expense Account",
view_load=True,
help="This account will be used for invoices instead of the default one to value expenses for the current product."), help="This account will be used for invoices instead of the default one to value expenses for the current product."),
} }

View File

@ -24,27 +24,21 @@ class product_category(osv.osv):
_inherit = "product.category" _inherit = "product.category"
_columns = { _columns = {
'property_account_creditor_price_difference_categ': fields.property( 'property_account_creditor_price_difference_categ': fields.property(
'account.account',
type='many2one', type='many2one',
relation='account.account', relation='account.account',
string="Price Difference Account", string="Price Difference Account",
view_load=True,
help="This account will be used to value price difference between purchase price and cost price."), help="This account will be used to value price difference between purchase price and cost price."),
#Redefine fields to change help text for anglo saxon methodology. #Redefine fields to change help text for anglo saxon methodology.
'property_account_income_categ': fields.property( 'property_account_income_categ': fields.property(
'account.account',
type='many2one', type='many2one',
relation='account.account', relation='account.account',
string="Income Account", string="Income Account",
view_load=True,
help="This account will be used to value outgoing stock using sale price."), help="This account will be used to value outgoing stock using sale price."),
'property_account_expense_categ': fields.property( 'property_account_expense_categ': fields.property(
'account.account',
type='many2one', type='many2one',
relation='account.account', relation='account.account',
string="Expense Account", string="Expense Account",
view_load=True,
help="This account will be used to value outgoing stock using cost price."), help="This account will be used to value outgoing stock using cost price."),
} }
@ -53,27 +47,21 @@ class product_template(osv.osv):
_inherit = "product.template" _inherit = "product.template"
_columns = { _columns = {
'property_account_creditor_price_difference': fields.property( 'property_account_creditor_price_difference': fields.property(
'account.account',
type='many2one', type='many2one',
relation='account.account', relation='account.account',
string="Price Difference Account", string="Price Difference Account",
view_load=True,
help="This account will be used to value price difference between purchase price and cost price."), help="This account will be used to value price difference between purchase price and cost price."),
#Redefine fields to change help text for anglo saxon methodology. #Redefine fields to change help text for anglo saxon methodology.
'property_account_income': fields.property( 'property_account_income': fields.property(
'account.account',
type='many2one', type='many2one',
relation='account.account', relation='account.account',
string="Income Account", string="Income Account",
view_load=True,
help="This account will be used to value outgoing stock using sale price."), help="This account will be used to value outgoing stock using sale price."),
'property_account_expense': fields.property( 'property_account_expense': fields.property(
'account.account',
type='many2one', type='many2one',
relation='account.account', relation='account.account',
string="Expense Account", string="Expense Account",
view_load=True,
help="This account will be used to value outgoing stock using cost price."), help="This account will be used to value outgoing stock using cost price."),
} }

View File

@ -25,11 +25,9 @@ class res_partner(osv.osv):
_inherit = 'res.partner' _inherit = 'res.partner'
_columns = { _columns = {
'property_delivery_carrier': fields.property( 'property_delivery_carrier': fields.property(
'delivery.carrier',
type='many2one', type='many2one',
relation='delivery.carrier', relation='delivery.carrier',
string="Delivery Method", string="Delivery Method",
view_load=True,
help="This delivery method will be used when invoicing from picking."), help="This delivery method will be used when invoicing from picking."),
} }

View File

@ -27,12 +27,10 @@ class res_partner(osv.osv):
_inherit = 'res.partner' _inherit = 'res.partner'
_columns = { _columns = {
'property_product_pricelist': fields.property( 'property_product_pricelist': fields.property(
'product.pricelist',
type='many2one', type='many2one',
relation='product.pricelist', relation='product.pricelist',
domain=[('type','=','sale')], domain=[('type','=','sale')],
string="Sale Pricelist", string="Sale Pricelist",
view_load=True,
help="This pricelist will be used, instead of the default one, for sales to the current partner"), help="This pricelist will be used, instead of the default one, for sales to the current partner"),
} }

View File

@ -302,13 +302,13 @@ class product_template(osv.osv):
'list_price': fields.float('Sale Price', digits_compute=dp.get_precision('Product Price'), help="Base price to compute the customer price. Sometimes called the catalog price."), 'list_price': fields.float('Sale Price', digits_compute=dp.get_precision('Product Price'), help="Base price to compute the customer price. Sometimes called the catalog price."),
#TODO: why is there a first empty arg? relation='' could be written server side, no? #TODO: why is there a first empty arg? relation='' could be written server side, no?
#TODO: put back decimal precision #TODO: put back decimal precision
'standard_price': fields.property('', type = 'float', view_load=True, 'standard_price': fields.property(type = 'float',
help="Cost price of the product used for standard stock valuation in accounting and used as a base price on purchase orders.", help="Cost price of the product used for standard stock valuation in accounting and used as a base price on purchase orders.",
groups="base.group_user", string="Cost"), groups="base.group_user", string="Cost"),
'volume': fields.float('Volume', help="The volume in m3."), 'volume': fields.float('Volume', help="The volume in m3."),
'weight': fields.float('Gross Weight', digits_compute=dp.get_precision('Stock Weight'), help="The gross weight in Kg."), 'weight': fields.float('Gross Weight', digits_compute=dp.get_precision('Stock Weight'), help="The gross weight in Kg."),
'weight_net': fields.float('Net Weight', digits_compute=dp.get_precision('Stock Weight'), help="The net weight in Kg."), 'weight_net': fields.float('Net Weight', digits_compute=dp.get_precision('Stock Weight'), help="The net weight in Kg."),
'cost_method': fields.property('', type='selection', view_load=True, selection = [('standard','Standard Price'), ('average','Average Price'), ('fifo', 'FIFO price'), ('lifo', 'LIFO price')], 'cost_method': fields.property(type='selection', selection = [('standard','Standard Price'), ('average','Average Price'), ('fifo', 'FIFO price'), ('lifo', 'LIFO price')],
help="Standard Price: The cost price is manually updated at the end of a specific period (usually every year). \nAverage Price: The cost price is recomputed at each incoming shipment.", help="Standard Price: The cost price is manually updated at the end of a specific period (usually every year). \nAverage Price: The cost price is recomputed at each incoming shipment.",
string="Costing Method"), string="Costing Method"),
'warranty': fields.float('Warranty'), 'warranty': fields.float('Warranty'),

View File

@ -48,12 +48,10 @@ class res_partner(osv.osv):
_columns = { _columns = {
'property_product_pricelist_purchase': fields.property( 'property_product_pricelist_purchase': fields.property(
'product.pricelist',
type='many2one', type='many2one',
relation='product.pricelist', relation='product.pricelist',
domain=[('type','=','purchase')], domain=[('type','=','purchase')],
string="Purchase Pricelist", string="Purchase Pricelist",
view_load=True,
help="This pricelist will be used, instead of the default one, for purchases from the current partner"), help="This pricelist will be used, instead of the default one, for purchases from the current partner"),
'purchase_order_count': fields.function(_purchase_order_count, string='# of Purchase Order', type='integer'), 'purchase_order_count': fields.function(_purchase_order_count, string='# of Purchase Order', type='integer'),
'purchase_order_ids': fields.one2many('purchase.order','partner_id','Purchase Order') 'purchase_order_ids': fields.one2many('purchase.order','partner_id','Purchase Order')

View File

@ -37,10 +37,10 @@ from webkit_report import WebKitParser
class ir_actions_report_xml(orm.Model): class ir_actions_report_xml(orm.Model):
_inherit = 'ir.actions.report.xml' _inherit = 'ir.actions.report.xml'
_columns = { _columns = {
'webkit_header': fields.property('ir.header_webkit', 'webkit_header': fields.property(
type='many2one', relation='ir.header_webkit', type='many2one', relation='ir.header_webkit',
string='Webkit Header', help="The header linked to the report", string='Webkit Header', help="The header linked to the report",
view_load=True, required=True), required=True),
'webkit_debug': fields.boolean('Webkit debug', 'webkit_debug': fields.boolean('Webkit debug',
help="Enable the webkit engine debugger"), help="Enable the webkit engine debugger"),
'report_webkit_data': fields.text('Webkit Template', 'report_webkit_data': fields.text('Webkit Template',

View File

@ -43,11 +43,9 @@ class res_partner(osv.osv):
_inherit = 'res.partner' _inherit = 'res.partner'
_columns = { _columns = {
'property_invoice_type': fields.property( 'property_invoice_type': fields.property(
'sale_journal.invoice.type',
type = 'many2one', type = 'many2one',
relation = 'sale_journal.invoice.type', relation = 'sale_journal.invoice.type',
string = "Invoicing Type", string = "Invoicing Type",
view_load = True,
group_name = "Accounting Properties", group_name = "Accounting Properties",
help = "This invoicing type will be used, by default, to invoice the current partner."), help = "This invoicing type will be used, by default, to invoice the current partner."),
} }

View File

@ -25,19 +25,15 @@ class res_partner(osv.osv):
_inherit = 'res.partner' _inherit = 'res.partner'
_columns = { _columns = {
'property_stock_customer': fields.property( 'property_stock_customer': fields.property(
'stock.location',
type='many2one', type='many2one',
relation='stock.location', relation='stock.location',
string="Customer Location", string="Customer Location",
view_load=True,
help="This stock location will be used, instead of the default one, as the destination location for goods you send to this partner"), help="This stock location will be used, instead of the default one, as the destination location for goods you send to this partner"),
'property_stock_supplier': fields.property( 'property_stock_supplier': fields.property(
'stock.location',
type='many2one', type='many2one',
relation='stock.location', relation='stock.location',
string="Supplier Location", string="Supplier Location",
view_load=True,
help="This stock location will be used, instead of the default one, as the source location for goods you receive from the current partner"), help="This stock location will be used, instead of the default one, as the source location for goods you receive from the current partner"),
} }

View File

@ -463,8 +463,8 @@ class product_product(osv.osv):
'location_id': fields.dummy(string='Location', relation='stock.location', type='many2one'), 'location_id': fields.dummy(string='Location', relation='stock.location', type='many2one'),
'warehouse_id': fields.dummy(string='Warehouse', relation='stock.warehouse', type='many2one'), 'warehouse_id': fields.dummy(string='Warehouse', relation='stock.warehouse', type='many2one'),
#TODO: why first arg is empty? #TODO: why first arg is empty?
'valuation':fields.property('', type='selection', selection = [('manual_periodic', 'Periodical (manual)'), 'valuation':fields.property(type='selection', selection=[('manual_periodic', 'Periodical (manual)'),
('real_time','Real Time (automated)'),], string = 'Inventory Valuation', view_load = '1', ('real_time','Real Time (automated)'),], string = 'Inventory Valuation',
help="If real-time valuation is enabled for a product, the system will automatically write journal entries corresponding to stock moves." \ help="If real-time valuation is enabled for a product, the system will automatically write journal entries corresponding to stock moves." \
"The inventory variation account set on the product category will represent the current inventory value, and the stock input and stock output account will hold the counterpart moves for incoming and outgoing products." "The inventory variation account set on the product category will represent the current inventory value, and the stock input and stock output account will hold the counterpart moves for incoming and outgoing products."
, required=True), , required=True),
@ -523,37 +523,33 @@ class product_template(osv.osv):
_inherit = 'product.template' _inherit = 'product.template'
_columns = { _columns = {
'property_stock_procurement': fields.property( 'property_stock_procurement': fields.property(
'stock.location',
type='many2one', type='many2one',
relation='stock.location', relation='stock.location',
string="Procurement Location", string="Procurement Location",
view_load=True,
domain=[('usage','like','procurement')], domain=[('usage','like','procurement')],
help="This stock location will be used, instead of the default one, as the source location for stock moves generated by procurements."), help="This stock location will be used, instead of the default one, as the source location for stock moves generated by procurements."),
'property_stock_production': fields.property( 'property_stock_production': fields.property(
'stock.location',
type='many2one', type='many2one',
relation='stock.location', relation='stock.location',
string="Production Location", string="Production Location",
view_load=True,
domain=[('usage','like','production')], domain=[('usage','like','production')],
help="This stock location will be used, instead of the default one, as the source location for stock moves generated by manufacturing orders."), help="This stock location will be used, instead of the default one, as the source location for stock moves generated by manufacturing orders."),
'property_stock_inventory': fields.property( 'property_stock_inventory': fields.property(
'stock.location',
type='many2one', type='many2one',
relation='stock.location', relation='stock.location',
string="Inventory Location", string="Inventory Location",
view_load=True,
domain=[('usage','like','inventory')], domain=[('usage','like','inventory')],
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."), 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."),
'property_stock_account_input': fields.property('account.account', 'property_stock_account_input': fields.property(
type='many2one', relation='account.account', type='many2one',
string='Stock Input Account', view_load=True, relation='account.account',
string='Stock Input Account',
help="When doing real-time inventory valuation, counterpart journal items for all incoming stock moves will be posted in this account, unless " help="When doing real-time inventory valuation, counterpart journal items for all incoming stock moves will be posted in this account, unless "
"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."), "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."),
'property_stock_account_output': fields.property('account.account', 'property_stock_account_output': fields.property(
type='many2one', relation='account.account', type='many2one',
string='Stock Output Account', view_load=True, relation='account.account',
string='Stock Output Account',
help="When doing real-time inventory valuation, counterpart journal items for all outgoing stock moves will be posted in this account, unless " help="When doing real-time inventory valuation, counterpart journal items for all outgoing stock moves will be posted in this account, unless "
"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."), "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."),
'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."), '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."),
@ -570,27 +566,29 @@ class product_category(osv.osv):
_inherit = 'product.category' _inherit = 'product.category'
_columns = { _columns = {
'property_stock_journal': fields.property('account.journal', 'property_stock_journal': fields.property(
relation='account.journal', type='many2one', relation='account.journal',
string='Stock Journal', view_load=True, type='many2one',
string='Stock Journal',
help="When doing real-time inventory valuation, this is the Accounting Journal in which entries will be automatically posted when stock moves are processed."), help="When doing real-time inventory valuation, this is the Accounting Journal in which entries will be automatically posted when stock moves are processed."),
'property_stock_account_input_categ': fields.property('account.account', 'property_stock_account_input_categ': fields.property(
type='many2one', relation='account.account', type='many2one',
string='Stock Input Account', view_load=True, relation='account.account',
string='Stock Input Account',
help="When doing real-time inventory valuation, counterpart journal items for all incoming stock moves will be posted in this account, unless " help="When doing real-time inventory valuation, counterpart journal items for all incoming stock moves will be posted in this account, unless "
"there is a specific valuation account set on the source location. This is the default value for all products in this category. It " "there is a specific valuation account set on the source location. This is the default value for all products in this category. It "
"can also directly be set on each product"), "can also directly be set on each product"),
'property_stock_account_output_categ': fields.property('account.account', 'property_stock_account_output_categ': fields.property(
type='many2one', relation='account.account', type='many2one',
string='Stock Output Account', view_load=True, relation='account.account',
string='Stock Output Account',
help="When doing real-time inventory valuation, counterpart journal items for all outgoing stock moves will be posted in this account, unless " help="When doing real-time inventory valuation, counterpart journal items for all outgoing stock moves will be posted in this account, unless "
"there is a specific valuation account set on the destination location. This is the default value for all products in this category. It " "there is a specific valuation account set on the destination location. This is the default value for all products in this category. It "
"can also directly be set on each product"), "can also directly be set on each product"),
'property_stock_valuation_account_id': fields.property('account.account', 'property_stock_valuation_account_id': fields.property(
type='many2one', type='many2one',
relation='account.account', relation='account.account',
string="Stock Valuation Account", string="Stock Valuation Account",
view_load=True,
help="When real-time inventory valuation is enabled on a product, this account will hold the current value of the products.",), help="When real-time inventory valuation is enabled on a product, this account will hold the current value of the products.",),
} }