[IMP] replace 'Price Unit name by 'Product Price'
bzr revid: benoit.guillot@akretion.com.br-20120711130615-25ascb8dfllo4r7j
This commit is contained in:
parent
58b4fdb096
commit
dc3ae0488b
|
@ -1351,7 +1351,7 @@ class account_invoice_line(osv.osv):
|
||||||
'uos_id': fields.many2one('product.uom', 'Unit of Measure', ondelete='set null'),
|
'uos_id': fields.many2one('product.uom', 'Unit of Measure', ondelete='set null'),
|
||||||
'product_id': fields.many2one('product.product', 'Product', ondelete='set null'),
|
'product_id': fields.many2one('product.product', 'Product', ondelete='set null'),
|
||||||
'account_id': fields.many2one('account.account', 'Account', required=True, domain=[('type','<>','view'), ('type', '<>', 'closed')], help="The income or expense account related to the selected product."),
|
'account_id': fields.many2one('account.account', 'Account', required=True, domain=[('type','<>','view'), ('type', '<>', 'closed')], help="The income or expense account related to the selected product."),
|
||||||
'price_unit': fields.float('Unit Price', required=True, digits_compute= dp.get_precision('Price Unit')),
|
'price_unit': fields.float('Unit Price', required=True, digits_compute= dp.get_precision('Product Price')),
|
||||||
'price_subtotal': fields.function(_amount_line, string='Subtotal', type="float",
|
'price_subtotal': fields.function(_amount_line, string='Subtotal', type="float",
|
||||||
digits_compute= dp.get_precision('Account'), store=True),
|
digits_compute= dp.get_precision('Account'), store=True),
|
||||||
'quantity': fields.float('Quantity', digits_compute= dp.get_precision('Product Unit of Measure'), required=True),
|
'quantity': fields.float('Quantity', digits_compute= dp.get_precision('Product Unit of Measure'), required=True),
|
||||||
|
|
|
@ -238,8 +238,8 @@ class delivery_grid_line(osv.osv):
|
||||||
'max_value': fields.float('Maximum Value', required=True),
|
'max_value': fields.float('Maximum Value', required=True),
|
||||||
'price_type': fields.selection([('fixed','Fixed'),('variable','Variable')], 'Price Type', required=True),
|
'price_type': fields.selection([('fixed','Fixed'),('variable','Variable')], 'Price Type', required=True),
|
||||||
'variable_factor': fields.selection([('weight','Weight'),('volume','Volume'),('wv','Weight * Volume'), ('price','Price')], 'Variable Factor', required=True),
|
'variable_factor': fields.selection([('weight','Weight'),('volume','Volume'),('wv','Weight * Volume'), ('price','Price')], 'Variable Factor', required=True),
|
||||||
'list_price': fields.float('Sale Price', digits_compute= dp.get_precision('Price Unit'), required=True),
|
'list_price': fields.float('Sale Price', digits_compute= dp.get_precision('Product Price'), required=True),
|
||||||
'standard_price': fields.float('Cost Price', digits_compute= dp.get_precision('Price Unit'), required=True),
|
'standard_price': fields.float('Cost Price', digits_compute= dp.get_precision('Product Price'), required=True),
|
||||||
}
|
}
|
||||||
_defaults = {
|
_defaults = {
|
||||||
'type': lambda *args: 'weight',
|
'type': lambda *args: 'weight',
|
||||||
|
|
|
@ -258,7 +258,7 @@ class hr_expense_line(osv.osv):
|
||||||
'date_value': fields.date('Date', required=True),
|
'date_value': fields.date('Date', required=True),
|
||||||
'expense_id': fields.many2one('hr.expense.expense', 'Expense', ondelete='cascade', select=True),
|
'expense_id': fields.many2one('hr.expense.expense', 'Expense', ondelete='cascade', select=True),
|
||||||
'total_amount': fields.function(_amount, string='Total', digits_compute=dp.get_precision('Account')),
|
'total_amount': fields.function(_amount, string='Total', digits_compute=dp.get_precision('Account')),
|
||||||
'unit_amount': fields.float('Unit Price', digits_compute=dp.get_precision('Price Unit')),
|
'unit_amount': fields.float('Unit Price', digits_compute=dp.get_precision('Product Price')),
|
||||||
'unit_quantity': fields.float('Quantities', digits_compute= dp.get_precision('Product Unit of Measure')),
|
'unit_quantity': fields.float('Quantities', digits_compute= dp.get_precision('Product Unit of Measure')),
|
||||||
'product_id': fields.many2one('product.product', 'Product', domain=[('hr_expense_ok','=',True)]),
|
'product_id': fields.many2one('product.product', 'Product', domain=[('hr_expense_ok','=',True)]),
|
||||||
'uom_id': fields.many2one('product.uom', 'Unit of Measure'),
|
'uom_id': fields.many2one('product.uom', 'Unit of Measure'),
|
||||||
|
|
|
@ -72,7 +72,7 @@ class report_account_analytic_line_to_invoice(osv.osv):
|
||||||
'account_id':fields.many2one('account.analytic.account', 'Analytic account', readonly=True),
|
'account_id':fields.many2one('account.analytic.account', 'Analytic account', readonly=True),
|
||||||
'product_uom_id':fields.many2one('product.uom', 'Unit of Measure', readonly=True),
|
'product_uom_id':fields.many2one('product.uom', 'Unit of Measure', readonly=True),
|
||||||
'unit_amount': fields.float('Units', readonly=True),
|
'unit_amount': fields.float('Units', readonly=True),
|
||||||
'sale_price': fields.float('Sale price', readonly=True, digits_compute=dp.get_precision('Price Unit')),
|
'sale_price': fields.float('Sale price', readonly=True, digits_compute=dp.get_precision('Product Price')),
|
||||||
'amount': fields.float('Amount', readonly=True, digits_compute=dp.get_precision('Account')),
|
'amount': fields.float('Amount', readonly=True, digits_compute=dp.get_precision('Account')),
|
||||||
'month':fields.selection([('01','January'), ('02','February'), ('03','March'), ('04','April'), ('05','May'), ('06','June'),
|
'month':fields.selection([('01','January'), ('02','February'), ('03','March'), ('04','April'), ('05','May'), ('06','June'),
|
||||||
('07','July'), ('08','August'), ('09','September'), ('10','October'), ('11','November'), ('12','December')],'Month',readonly=True),
|
('07','July'), ('08','August'), ('09','September'), ('10','October'), ('11','November'), ('12','December')],'Month',readonly=True),
|
||||||
|
|
|
@ -120,7 +120,7 @@ Normal - the campaign runs normally and automatically sends all emails and repor
|
||||||
'Status',),
|
'Status',),
|
||||||
'activity_ids': fields.one2many('marketing.campaign.activity',
|
'activity_ids': fields.one2many('marketing.campaign.activity',
|
||||||
'campaign_id', 'Activities'),
|
'campaign_id', 'Activities'),
|
||||||
'fixed_cost': fields.float('Fixed Cost', help="Fixed cost for running this campaign. You may also specify variable cost and revenue on each campaign activity. Cost and Revenue statistics are included in Campaign Reporting.", digits_compute=dp.get_precision('Price Unit')),
|
'fixed_cost': fields.float('Fixed Cost', help="Fixed cost for running this campaign. You may also specify variable cost and revenue on each campaign activity. Cost and Revenue statistics are included in Campaign Reporting.", digits_compute=dp.get_precision('Product Price')),
|
||||||
}
|
}
|
||||||
|
|
||||||
_defaults = {
|
_defaults = {
|
||||||
|
@ -435,7 +435,7 @@ class marketing_campaign_activity(osv.osv):
|
||||||
'from_ids': fields.one2many('marketing.campaign.transition',
|
'from_ids': fields.one2many('marketing.campaign.transition',
|
||||||
'activity_to_id',
|
'activity_to_id',
|
||||||
'Previous Activities'),
|
'Previous Activities'),
|
||||||
'variable_cost': fields.float('Variable Cost', help="Set a variable cost if you consider that every campaign item that has reached this point has entailed a certain cost. You can get cost statistics in the Reporting section", digits_compute=dp.get_precision('Price Unit')),
|
'variable_cost': fields.float('Variable Cost', help="Set a variable cost if you consider that every campaign item that has reached this point has entailed a certain cost. You can get cost statistics in the Reporting section", digits_compute=dp.get_precision('Product Price')),
|
||||||
'revenue': fields.float('Revenue', help="Set an expected revenue if you consider that every campaign item that has reached this point has generated a certain revenue. You can get revenue statistics in the Reporting section", digits_compute=dp.get_precision('Account')),
|
'revenue': fields.float('Revenue', help="Set an expected revenue if you consider that every campaign item that has reached this point has generated a certain revenue. You can get revenue statistics in the Reporting section", digits_compute=dp.get_precision('Account')),
|
||||||
'signal': fields.char('Signal', size=128,
|
'signal': fields.char('Signal', size=128,
|
||||||
help='An activity with a signal can be called programmatically. Be careful, the workitem is always created when a signal is sent'),
|
help='An activity with a signal can be called programmatically. Be careful, the workitem is always created when a signal is sent'),
|
||||||
|
|
|
@ -146,7 +146,7 @@ class membership_line(osv.osv):
|
||||||
'date_to': fields.date('To', readonly=True),
|
'date_to': fields.date('To', readonly=True),
|
||||||
'date_cancel': fields.date('Cancel date'),
|
'date_cancel': fields.date('Cancel date'),
|
||||||
'date': fields.date('Join Date', help="Date on which member has joined the membership"),
|
'date': fields.date('Join Date', help="Date on which member has joined the membership"),
|
||||||
'member_price': fields.float('Member Price', digits_compute= dp.get_precision('Price Unit'), required=True, help='Amount for the membership'),
|
'member_price': fields.float('Member Price', digits_compute= dp.get_precision('Product Price'), required=True, help='Amount for the membership'),
|
||||||
'account_invoice_line': fields.many2one('account.invoice.line', 'Account Invoice line', readonly=True),
|
'account_invoice_line': fields.many2one('account.invoice.line', 'Account Invoice line', readonly=True),
|
||||||
'account_invoice_id': fields.related('account_invoice_line', 'invoice_id', type='many2one', relation='account.invoice', string='Invoice', readonly=True),
|
'account_invoice_id': fields.related('account_invoice_line', 'invoice_id', type='many2one', relation='account.invoice', string='Invoice', readonly=True),
|
||||||
'state': fields.function(_state,
|
'state': fields.function(_state,
|
||||||
|
@ -447,7 +447,7 @@ Partner()
|
||||||
class product_template(osv.osv):
|
class product_template(osv.osv):
|
||||||
_inherit = 'product.template'
|
_inherit = 'product.template'
|
||||||
_columns = {
|
_columns = {
|
||||||
'member_price': fields.float('Member Price', digits_compute= dp.get_precision('Price Unit')),
|
'member_price': fields.float('Member Price', digits_compute= dp.get_precision('Product Price')),
|
||||||
}
|
}
|
||||||
|
|
||||||
product_template()
|
product_template()
|
||||||
|
|
|
@ -29,7 +29,7 @@ class membership_invoice(osv.osv_memory):
|
||||||
_description = "Membership Invoice"
|
_description = "Membership Invoice"
|
||||||
_columns = {
|
_columns = {
|
||||||
'product_id': fields.many2one('product.product','Membership', required=True),
|
'product_id': fields.many2one('product.product','Membership', required=True),
|
||||||
'member_price': fields.float('Member Price', digits_compute= dp.get_precision('Price Unit'), required=True),
|
'member_price': fields.float('Member Price', digits_compute= dp.get_precision('Product Price'), required=True),
|
||||||
}
|
}
|
||||||
def onchange_product(self, cr, uid, ids, product_id=False):
|
def onchange_product(self, cr, uid, ids, product_id=False):
|
||||||
"""This function returns value of product's member price based on product id.
|
"""This function returns value of product's member price based on product id.
|
||||||
|
|
|
@ -138,7 +138,7 @@ class report_custom(report_rml):
|
||||||
</row>
|
</row>
|
||||||
""" % (_('Components'), _('Components suppliers'), _('Quantity'),_('Cost Price per Unit of Measure'), _('Supplier Price per Unit of Measure'))
|
""" % (_('Components'), _('Components suppliers'), _('Quantity'),_('Cost Price per Unit of Measure'), _('Supplier Price per Unit of Measure'))
|
||||||
|
|
||||||
purchase_price_digits = rml_obj.get_digits(dp='Price Unit')
|
purchase_price_digits = rml_obj.get_digits(dp='Product Price')
|
||||||
|
|
||||||
for product in product_pool.browse(cr, uid, ids, context=context):
|
for product in product_pool.browse(cr, uid, ids, context=context):
|
||||||
product_uom_name = to_xml(product.uom_id.name)
|
product_uom_name = to_xml(product.uom_id.name)
|
||||||
|
|
|
@ -640,7 +640,7 @@ class mrp_repair_line(osv.osv, ProductChangeMixin):
|
||||||
'to_invoice': fields.boolean('To Invoice'),
|
'to_invoice': fields.boolean('To Invoice'),
|
||||||
'product_id': fields.many2one('product.product', 'Product', domain=[('sale_ok','=',True)], required=True),
|
'product_id': fields.many2one('product.product', 'Product', domain=[('sale_ok','=',True)], required=True),
|
||||||
'invoiced': fields.boolean('Invoiced',readonly=True),
|
'invoiced': fields.boolean('Invoiced',readonly=True),
|
||||||
'price_unit': fields.float('Unit Price', required=True, digits_compute= dp.get_precision('Price Unit')),
|
'price_unit': fields.float('Unit Price', required=True, digits_compute= dp.get_precision('Product Price')),
|
||||||
'price_subtotal': fields.function(_amount_line, string='Subtotal',digits_compute= dp.get_precision('Account')),
|
'price_subtotal': fields.function(_amount_line, string='Subtotal',digits_compute= dp.get_precision('Account')),
|
||||||
'tax_id': fields.many2many('account.tax', 'repair_operation_line_tax', 'repair_operation_line_id', 'tax_id', 'Taxes'),
|
'tax_id': fields.many2many('account.tax', 'repair_operation_line_tax', 'repair_operation_line_id', 'tax_id', 'Taxes'),
|
||||||
'product_uom_qty': fields.float('Quantity (Unit of Measure)', digits_compute= dp.get_precision('Product Unit of Measure'), required=True),
|
'product_uom_qty': fields.float('Quantity (Unit of Measure)', digits_compute= dp.get_precision('Product Unit of Measure'), required=True),
|
||||||
|
|
|
@ -408,18 +408,18 @@ class product_pricelist_item(osv.osv):
|
||||||
'base_pricelist_id': fields.many2one('product.pricelist', 'If Other Pricelist'),
|
'base_pricelist_id': fields.many2one('product.pricelist', 'If Other Pricelist'),
|
||||||
|
|
||||||
'price_surcharge': fields.float('Price Surcharge',
|
'price_surcharge': fields.float('Price Surcharge',
|
||||||
digits_compute= dp.get_precision('Price Unit')),
|
digits_compute= dp.get_precision('Product Price')),
|
||||||
'price_discount': fields.float('Price Discount', digits=(16,4)),
|
'price_discount': fields.float('Price Discount', digits=(16,4)),
|
||||||
'price_round': fields.float('Price Rounding',
|
'price_round': fields.float('Price Rounding',
|
||||||
digits_compute= dp.get_precision('Price Unit'),
|
digits_compute= dp.get_precision('Product Price'),
|
||||||
help="Sets the price so that it is a multiple of this value.\n" \
|
help="Sets the price so that it is a multiple of this value.\n" \
|
||||||
"Rounding is applied after the discount and before the surcharge.\n" \
|
"Rounding is applied after the discount and before the surcharge.\n" \
|
||||||
"To have prices that end in 9.99, set rounding 10, surcharge -0.01" \
|
"To have prices that end in 9.99, set rounding 10, surcharge -0.01" \
|
||||||
),
|
),
|
||||||
'price_min_margin': fields.float('Min. Price Margin',
|
'price_min_margin': fields.float('Min. Price Margin',
|
||||||
digits_compute= dp.get_precision('Price Unit')),
|
digits_compute= dp.get_precision('Product Price')),
|
||||||
'price_max_margin': fields.float('Max. Price Margin',
|
'price_max_margin': fields.float('Max. Price Margin',
|
||||||
digits_compute= dp.get_precision('Price Unit')),
|
digits_compute= dp.get_precision('Product Price')),
|
||||||
'company_id': fields.related('price_version_id','company_id',type='many2one',
|
'company_id': fields.related('price_version_id','company_id',type='many2one',
|
||||||
readonly=True, relation='res.company', string='Company', store=True)
|
readonly=True, relation='res.company', string='Company', store=True)
|
||||||
}
|
}
|
||||||
|
|
|
@ -297,8 +297,8 @@ class product_template(osv.osv):
|
||||||
'procure_method': fields.selection([('make_to_stock','Make to Stock'),('make_to_order','Make to Order')], 'Procurement Method', required=True, help="'Make to Stock': When needed, take from the stock or wait until re-supplying. 'Make to Order': When needed, purchase or produce for the procurement request."),
|
'procure_method': fields.selection([('make_to_stock','Make to Stock'),('make_to_order','Make to Order')], 'Procurement Method', required=True, help="'Make to Stock': When needed, take from the stock or wait until re-supplying. 'Make to Order': When needed, purchase or produce for the procurement request."),
|
||||||
'rental': fields.boolean('Can be Rent'),
|
'rental': fields.boolean('Can be Rent'),
|
||||||
'categ_id': fields.many2one('product.category','Category', required=True, change_default=True, domain="[('type','=','normal')]" ,help="Select category for the current product"),
|
'categ_id': fields.many2one('product.category','Category', required=True, change_default=True, domain="[('type','=','normal')]" ,help="Select category for the current product"),
|
||||||
'list_price': fields.float('Sale Price', digits_compute=dp.get_precision('Price Unit'), help="Base price for computing the customer price. Sometimes called the catalog price."),
|
'list_price': fields.float('Sale Price', digits_compute=dp.get_precision('Product Price'), help="Base price for computing the customer price. Sometimes called the catalog price."),
|
||||||
'standard_price': fields.float('Cost Price', required=True, digits_compute=dp.get_precision('Price Unit'), help="Product's cost for accounting stock valuation. It is the base price for the supplier price.", groups="base.group_user"),
|
'standard_price': fields.float('Cost Price', required=True, digits_compute=dp.get_precision('Product Price'), help="Product's cost for accounting stock valuation. It is the base price for the supplier price.", groups="base.group_user"),
|
||||||
'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."),
|
||||||
|
@ -510,8 +510,8 @@ class product_product(osv.osv):
|
||||||
'virtual_available': fields.function(_product_virtual_available, type='float', string='Quantity Available'),
|
'virtual_available': fields.function(_product_virtual_available, type='float', string='Quantity Available'),
|
||||||
'incoming_qty': fields.function(_product_incoming_qty, type='float', string='Incoming'),
|
'incoming_qty': fields.function(_product_incoming_qty, type='float', string='Incoming'),
|
||||||
'outgoing_qty': fields.function(_product_outgoing_qty, type='float', string='Outgoing'),
|
'outgoing_qty': fields.function(_product_outgoing_qty, type='float', string='Outgoing'),
|
||||||
'price': fields.function(_product_price, type='float', string='Pricelist', digits_compute=dp.get_precision('Price Unit')),
|
'price': fields.function(_product_price, type='float', string='Pricelist', digits_compute=dp.get_precision('Product Price')),
|
||||||
'lst_price' : fields.function(_product_lst_price, type='float', string='Public Price', digits_compute=dp.get_precision('Price Unit')),
|
'lst_price' : fields.function(_product_lst_price, type='float', string='Public Price', digits_compute=dp.get_precision('Product Price')),
|
||||||
'code': fields.function(_product_code, type='char', string='Reference'),
|
'code': fields.function(_product_code, type='char', string='Reference'),
|
||||||
'partner_ref' : fields.function(_product_partner_ref, type='char', string='Customer ref'),
|
'partner_ref' : fields.function(_product_partner_ref, type='char', string='Customer ref'),
|
||||||
'default_code' : fields.char('Reference', size=64, select=True),
|
'default_code' : fields.char('Reference', size=64, select=True),
|
||||||
|
@ -520,8 +520,8 @@ class product_product(osv.osv):
|
||||||
'product_tmpl_id': fields.many2one('product.template', 'Product Template', required=True, ondelete="cascade"),
|
'product_tmpl_id': fields.many2one('product.template', 'Product Template', required=True, ondelete="cascade"),
|
||||||
'ean13': fields.char('EAN13', size=13, help="The numbers encoded in EAN-13 bar codes are product identification numbers."),
|
'ean13': fields.char('EAN13', size=13, help="The numbers encoded in EAN-13 bar codes are product identification numbers."),
|
||||||
'packaging' : fields.one2many('product.packaging', 'product_id', 'Logistical Units', help="Gives the different ways to package the same product. This has no impact on the picking order and is mainly used if you use the EDI module."),
|
'packaging' : fields.one2many('product.packaging', 'product_id', 'Logistical Units', help="Gives the different ways to package the same product. This has no impact on the picking order and is mainly used if you use the EDI module."),
|
||||||
'price_extra': fields.float('Variant Price Extra', digits_compute=dp.get_precision('Price Unit')),
|
'price_extra': fields.float('Variant Price Extra', digits_compute=dp.get_precision('Product Price')),
|
||||||
'price_margin': fields.float('Variant Price Margin', digits_compute=dp.get_precision('Price Unit')),
|
'price_margin': fields.float('Variant Price Margin', digits_compute=dp.get_precision('Product Price')),
|
||||||
'pricelist_id': fields.dummy(string='Pricelist', relation='product.pricelist', type='many2one'),
|
'pricelist_id': fields.dummy(string='Pricelist', relation='product.pricelist', type='many2one'),
|
||||||
'name_template': fields.related('product_tmpl_id', 'name', string="Name", type='char', size=128, store=True, select=True),
|
'name_template': fields.related('product_tmpl_id', 'name', string="Name", type='char', size=128, store=True, select=True),
|
||||||
'color': fields.integer('Color Index'),
|
'color': fields.integer('Color Index'),
|
||||||
|
@ -845,7 +845,7 @@ class pricelist_partnerinfo(osv.osv):
|
||||||
'name': fields.char('Description', size=64),
|
'name': fields.char('Description', size=64),
|
||||||
'suppinfo_id': fields.many2one('product.supplierinfo', 'Partner Information', required=True, ondelete='cascade'),
|
'suppinfo_id': fields.many2one('product.supplierinfo', 'Partner Information', required=True, ondelete='cascade'),
|
||||||
'min_quantity': fields.float('Quantity', required=True, help="The minimal quantity to trigger this rule, expressed in the supplier Unit of Measure if any or in the default Unit of Measure of the product otherrwise."),
|
'min_quantity': fields.float('Quantity', required=True, help="The minimal quantity to trigger this rule, expressed in the supplier Unit of Measure if any or in the default Unit of Measure of the product otherrwise."),
|
||||||
'price': fields.float('Unit Price', required=True, digits_compute=dp.get_precision('Price Unit'), help="This price will be considered as a price for the supplier Unit of Measure if any or the default Unit of Measure of the product otherwise"),
|
'price': fields.float('Unit Price', required=True, digits_compute=dp.get_precision('Product Price'), help="This price will be considered as a price for the supplier Unit of Measure if any or the default Unit of Measure of the product otherwise"),
|
||||||
}
|
}
|
||||||
_order = 'min_quantity asc'
|
_order = 'min_quantity asc'
|
||||||
pricelist_partnerinfo()
|
pricelist_partnerinfo()
|
||||||
|
|
|
@ -145,7 +145,7 @@ parameter) will see those record just disappear.
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<record forcecreate="True" id="decimal_price" model="decimal.precision">
|
<record forcecreate="True" id="decimal_price" model="decimal.precision">
|
||||||
<field name="name">Price Unit</field>
|
<field name="name">Product Price</field>
|
||||||
<field name="digits">2</field>
|
<field name="digits">2</field>
|
||||||
</record>
|
</record>
|
||||||
<record forcecreate="True" id="decimal_discount" model="decimal.precision">
|
<record forcecreate="True" id="decimal_discount" model="decimal.precision">
|
||||||
|
|
|
@ -112,7 +112,7 @@ class product_pricelist(report_sxw.rml_parse):
|
||||||
return res
|
return res
|
||||||
|
|
||||||
def _get_price(self,pricelist_id, product_id,qty):
|
def _get_price(self,pricelist_id, product_id,qty):
|
||||||
sale_price_digits = self.get_digits(dp='Price Unit')
|
sale_price_digits = self.get_digits(dp='Product Price')
|
||||||
pool = pooler.get_pool(self.cr.dbname)
|
pool = pooler.get_pool(self.cr.dbname)
|
||||||
price_dict = pool.get('product.pricelist').price_get(self.cr, self.uid, [pricelist_id], product_id, qty, context=self.localcontext)
|
price_dict = pool.get('product.pricelist').price_get(self.cr, self.uid, [pricelist_id], product_id, qty, context=self.localcontext)
|
||||||
if price_dict[pricelist_id]:
|
if price_dict[pricelist_id]:
|
||||||
|
|
|
@ -804,7 +804,7 @@ class purchase_order_line(osv.osv):
|
||||||
'product_id': fields.many2one('product.product', 'Product', domain=[('purchase_ok','=',True)], change_default=True),
|
'product_id': fields.many2one('product.product', 'Product', domain=[('purchase_ok','=',True)], change_default=True),
|
||||||
'move_ids': fields.one2many('stock.move', 'purchase_line_id', 'Reservation', readonly=True, ondelete='set null'),
|
'move_ids': fields.one2many('stock.move', 'purchase_line_id', 'Reservation', readonly=True, ondelete='set null'),
|
||||||
'move_dest_id': fields.many2one('stock.move', 'Reservation Destination', ondelete='set null'),
|
'move_dest_id': fields.many2one('stock.move', 'Reservation Destination', ondelete='set null'),
|
||||||
'price_unit': fields.float('Unit Price', required=True, digits_compute= dp.get_precision('Price Unit')),
|
'price_unit': fields.float('Unit Price', required=True, digits_compute= dp.get_precision('Product Price')),
|
||||||
'price_subtotal': fields.function(_amount_line, string='Subtotal', digits_compute= dp.get_precision('Account')),
|
'price_subtotal': fields.function(_amount_line, string='Subtotal', digits_compute= dp.get_precision('Account')),
|
||||||
'notes': fields.text('Notes'),
|
'notes': fields.text('Notes'),
|
||||||
'order_id': fields.many2one('purchase.order', 'Order Reference', select=True, required=True, ondelete='cascade'),
|
'order_id': fields.many2one('purchase.order', 'Order Reference', select=True, required=True, ondelete='cascade'),
|
||||||
|
|
|
@ -1113,7 +1113,7 @@ class sale_order_line(osv.osv):
|
||||||
'invoice_lines': fields.many2many('account.invoice.line', 'sale_order_line_invoice_rel', 'order_line_id', 'invoice_id', 'Invoice Lines', readonly=True),
|
'invoice_lines': fields.many2many('account.invoice.line', 'sale_order_line_invoice_rel', 'order_line_id', 'invoice_id', 'Invoice Lines', readonly=True),
|
||||||
'invoiced': fields.boolean('Invoiced', readonly=True),
|
'invoiced': fields.boolean('Invoiced', readonly=True),
|
||||||
'procurement_id': fields.many2one('procurement.order', 'Procurement'),
|
'procurement_id': fields.many2one('procurement.order', 'Procurement'),
|
||||||
'price_unit': fields.float('Unit Price', required=True, digits_compute= dp.get_precision('Price Unit'), readonly=True, states={'draft': [('readonly', False)]}),
|
'price_unit': fields.float('Unit Price', required=True, digits_compute= dp.get_precision('Product Price'), readonly=True, states={'draft': [('readonly', False)]}),
|
||||||
'price_subtotal': fields.function(_amount_line, string='Subtotal', digits_compute= dp.get_precision('Account')),
|
'price_subtotal': fields.function(_amount_line, string='Subtotal', digits_compute= dp.get_precision('Account')),
|
||||||
'tax_id': fields.many2many('account.tax', 'sale_order_tax', 'order_line_id', 'tax_id', 'Taxes', readonly=True, states={'draft': [('readonly', False)]}),
|
'tax_id': fields.many2many('account.tax', 'sale_order_tax', 'order_line_id', 'tax_id', 'Taxes', readonly=True, states={'draft': [('readonly', False)]}),
|
||||||
'type': fields.selection([('make_to_stock', 'from stock'), ('make_to_order', 'on order')], 'Procurement Method', required=True, readonly=True, states={'draft': [('readonly', False)]},
|
'type': fields.selection([('make_to_stock', 'from stock'), ('make_to_order', 'on order')], 'Procurement Method', required=True, readonly=True, states={'draft': [('readonly', False)]},
|
||||||
|
@ -1205,7 +1205,7 @@ class sale_order_line(osv.osv):
|
||||||
pu = 0.0
|
pu = 0.0
|
||||||
if uosqty:
|
if uosqty:
|
||||||
pu = round(line.price_unit * line.product_uom_qty / uosqty,
|
pu = round(line.price_unit * line.product_uom_qty / uosqty,
|
||||||
self.pool.get('decimal.precision').precision_get(cr, uid, 'Price Unit'))
|
self.pool.get('decimal.precision').precision_get(cr, uid, 'Product Price'))
|
||||||
fpos = line.order_id.fiscal_position or False
|
fpos = line.order_id.fiscal_position or False
|
||||||
account_id = self.pool.get('account.fiscal.position').map_account(cr, uid, fpos, account_id)
|
account_id = self.pool.get('account.fiscal.position').map_account(cr, uid, fpos, account_id)
|
||||||
if not account_id:
|
if not account_id:
|
||||||
|
|
Loading…
Reference in New Issue