diff --git a/addons/hr_payroll/models/hr_payroll.py b/addons/hr_payroll/models/hr_payroll.py index 8a5c54371967f5ebc6244fc384450c1ff9fba8f7..605f1317354e5afc3b5e2a1251d5be9681aa9d8b 100644 --- a/addons/hr_payroll/models/hr_payroll.py +++ b/addons/hr_payroll/models/hr_payroll.py @@ -710,8 +710,8 @@ class HrSalaryRule(models.Model): ('fix', 'Fixed Amount'), ('code', 'Python Code'), ], string='Amount Type', index=True, required=True, default='fix', help="The computation method for the rule amount.") - amount_fix = fields.Float(string='Fixed Amount', digits_compute=dp.get_precision('Payroll')) - amount_percentage = fields.Float(string='Percentage (%)', digits_compute=dp.get_precision('Payroll Rate'), + amount_fix = fields.Float(string='Fixed Amount', digits=dp.get_precision('Payroll')) + amount_percentage = fields.Float(string='Percentage (%)', digits=dp.get_precision('Payroll Rate'), help='For example, enter 50.0 to apply a percentage of 50%') amount_python_compute = fields.Text(string='Python Code', default=''' @@ -816,10 +816,10 @@ class HrPayslipLine(models.Model): salary_rule_id = fields.Many2one('hr.salary.rule', string='Rule', required=True) employee_id = fields.Many2one('hr.employee', string='Employee', required=True) contract_id = fields.Many2one('hr.contract', string='Contract', required=True, index=True) - rate = fields.Float(string='Rate (%)', digits_compute=dp.get_precision('Payroll Rate'), default=100.0) - amount = fields.Float(digits_compute=dp.get_precision('Payroll')) - quantity = fields.Float(digits_compute=dp.get_precision('Payroll'), default=1.0) - total = fields.Float(compute='_compute_total', string='Total', digits_compute=dp.get_precision('Payroll'), store=True) + rate = fields.Float(string='Rate (%)', digits=dp.get_precision('Payroll Rate'), default=100.0) + amount = fields.Float(digits=dp.get_precision('Payroll')) + quantity = fields.Float(digits=dp.get_precision('Payroll'), default=1.0) + total = fields.Float(compute='_compute_total', string='Total', digits=dp.get_precision('Payroll'), store=True) @api.depends('quantity', 'amount', 'rate') def _compute_total(self): diff --git a/addons/l10n_be_hr_payroll/models/l10n_be_hr_payroll.py b/addons/l10n_be_hr_payroll/models/l10n_be_hr_payroll.py index 7cfa403ef272bc31b100a6153bdec483012ae114..c8ca237988bfcca1174dfce6228a3fe64ae32ef2 100644 --- a/addons/l10n_be_hr_payroll/models/l10n_be_hr_payroll.py +++ b/addons/l10n_be_hr_payroll/models/l10n_be_hr_payroll.py @@ -8,16 +8,16 @@ from odoo.addons import decimal_precision as dp class HrContract(models.Model): _inherit = 'hr.contract' - travel_reimbursement_amount = fields.Float(string='Reimbursement of travel expenses', digits_compute=dp.get_precision('Payroll')) - car_company_amount = fields.Float(string='Company car employer', digits_compute=dp.get_precision('Payroll')) - car_employee_deduction = fields.Float(string='Company Car Deduction for Worker', digits_compute=dp.get_precision('Payroll')) - misc_onss_deduction = fields.Float(string='Miscellaneous exempt ONSS', digits_compute=dp.get_precision('Payroll')) - meal_voucher_amount = fields.Float(string='Check Value Meal', digits_compute=dp.get_precision('Payroll')) - meal_voucher_employee_deduction = fields.Float(string='Check Value Meal - by worker', digits_compute=dp.get_precision('Payroll')) - insurance_employee_deduction = fields.Float(string='Insurance Group - by worker', digits_compute=dp.get_precision('Payroll')) - misc_advantage_amount = fields.Float(string='Benefits of various nature', digits_compute=dp.get_precision('Payroll')) - additional_net_amount = fields.Float(string='Net supplements', digits_compute=dp.get_precision('Payroll')) - retained_net_amount = fields.Float('Net retained ', digits_compute=dp.get_precision('Payroll')) + travel_reimbursement_amount = fields.Float(string='Reimbursement of travel expenses', digits=dp.get_precision('Payroll')) + car_company_amount = fields.Float(string='Company car employer', digits=dp.get_precision('Payroll')) + car_employee_deduction = fields.Float(string='Company Car Deduction for Worker', digits=dp.get_precision('Payroll')) + misc_onss_deduction = fields.Float(string='Miscellaneous exempt ONSS', digits=dp.get_precision('Payroll')) + meal_voucher_amount = fields.Float(string='Check Value Meal', digits=dp.get_precision('Payroll')) + meal_voucher_employee_deduction = fields.Float(string='Check Value Meal - by worker', digits=dp.get_precision('Payroll')) + insurance_employee_deduction = fields.Float(string='Insurance Group - by worker', digits=dp.get_precision('Payroll')) + misc_advantage_amount = fields.Float(string='Benefits of various nature', digits=dp.get_precision('Payroll')) + additional_net_amount = fields.Float(string='Net supplements', digits=dp.get_precision('Payroll')) + retained_net_amount = fields.Float('Net retained ', digits=dp.get_precision('Payroll')) class HrEmployee(models.Model): diff --git a/addons/l10n_fr_hr_payroll/models/l10n_fr_hr_payroll.py b/addons/l10n_fr_hr_payroll/models/l10n_fr_hr_payroll.py index c430fcd0543d7c0b73faf0e3f133d508d3313b1f..cdc0cca330de82a781a8e20e926323a444d32b9f 100644 --- a/addons/l10n_fr_hr_payroll/models/l10n_fr_hr_payroll.py +++ b/addons/l10n_fr_hr_payroll/models/l10n_fr_hr_payroll.py @@ -8,9 +8,9 @@ from odoo.addons import decimal_precision as dp class ResCompany(models.Model): _inherit = 'res.company' - plafond_secu = fields.Float(string='Plafond de la Securite Sociale', digits_compute=dp.get_precision('Payroll')) + plafond_secu = fields.Float(string='Plafond de la Securite Sociale', digits=dp.get_precision('Payroll')) nombre_employes = fields.Integer(string='Nombre d\'employes') - cotisation_prevoyance = fields.Float(string='Cotisation Patronale Prevoyance', digits_compute=dp.get_precision('Payroll')) + cotisation_prevoyance = fields.Float(string='Cotisation Patronale Prevoyance', digits=dp.get_precision('Payroll')) org_ss = fields.Char(string='Organisme de securite sociale') conv_coll = fields.Char(string='Convention collective') diff --git a/addons/l10n_in_hr_payroll/models/l10n_in_hr_payroll.py b/addons/l10n_in_hr_payroll/models/l10n_in_hr_payroll.py index 1ec3ca9deda0b128a443f9f5a7b146366019a6f3..cbab8f2ef759065ebec6144e6e6efeffa18538b5 100644 --- a/addons/l10n_in_hr_payroll/models/l10n_in_hr_payroll.py +++ b/addons/l10n_in_hr_payroll/models/l10n_in_hr_payroll.py @@ -13,16 +13,16 @@ class HrContract(models.Model): """ _inherit = 'hr.contract' - tds = fields.Float(string='TDS', digits_compute=dp.get_precision('Payroll'), + tds = fields.Float(string='TDS', digits=dp.get_precision('Payroll'), help='Amount for Tax Deduction at Source') driver_salay = fields.Boolean(string='Driver Salary', help='Check this box if you provide allowance for driver') - medical_insurance = fields.Float(string='Medical Insurance', digits_compute=dp.get_precision('Payroll'), + medical_insurance = fields.Float(string='Medical Insurance', digits=dp.get_precision('Payroll'), help='Deduction towards company provided medical insurance') - voluntary_provident_fund = fields.Float(string='Voluntary Provident Fund (%)', digits_compute=dp.get_precision('Payroll'), + voluntary_provident_fund = fields.Float(string='Voluntary Provident Fund (%)', digits=dp.get_precision('Payroll'), help='VPF is a safe option wherein you can contribute more than the PF ceiling of 12% that has been mandated by the government and VPF computed as percentage(%)') - house_rent_allowance_metro_nonmetro = fields.Float(string='House Rent Allowance (%)', digits_compute=dp.get_precision('Payroll'), + house_rent_allowance_metro_nonmetro = fields.Float(string='House Rent Allowance (%)', digits=dp.get_precision('Payroll'), help='HRA is an allowance given by the employer to the employee for taking care of his rental or accommodation expenses for metro city it is 50% and for non metro 40%. \nHRA computed as percentage(%)') - supplementary_allowance = fields.Float(string='Supplementary Allowance', digits_compute=dp.get_precision('Payroll')) + supplementary_allowance = fields.Float(string='Supplementary Allowance', digits=dp.get_precision('Payroll')) class HrPayrollAdvice(models.Model): @@ -165,7 +165,7 @@ class HrPayrollAdviceLine(models.Model): name = fields.Char('Bank Account No.', required=True) ifsc_code = fields.Char(string='IFSC Code') employee_id = fields.Many2one('hr.employee', string='Employee', required=True) - bysal = fields.Float(string='By Salary', digits_compute=dp.get_precision('Payroll')) + bysal = fields.Float(string='By Salary', digits=dp.get_precision('Payroll')) debit_credit = fields.Char(string='C/D', default='C') company_id = fields.Many2one('res.company', related='advice_id.company_id', string='Company', store=True) ifsc = fields.Boolean(related='advice_id.neft', string='IFSC') diff --git a/addons/marketing_campaign/models/marketing_campaign.py b/addons/marketing_campaign/models/marketing_campaign.py index 597f5eabc89e7bfdbd6eda467ad9e2a5d3f7c984..5dd0fcae93cefd3550b5eb1087a4b9b532b22288 100644 --- a/addons/marketing_campaign/models/marketing_campaign.py +++ b/addons/marketing_campaign/models/marketing_campaign.py @@ -65,7 +65,7 @@ class MarketingCampaign(models.Model): 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')) + digits=dp.get_precision('Product Price')) segment_ids = fields.One2many('marketing.campaign.segment', 'campaign_id', 'Segments', readonly=False) segments_count = fields.Integer(compute='_compute_segments_count', string='Segments') @@ -308,7 +308,7 @@ class MarketingCampaignActivity(models.Model): help="The action to perform when this activity is activated") to_ids = fields.One2many('marketing.campaign.transition', 'activity_from_id', 'Next Activities') from_ids = fields.One2many('marketing.campaign.transition', 'activity_to_id', 'Previous Activities') - variable_cost = fields.Float('Variable Cost', digits_compute=dp.get_precision('Product Price'), + variable_cost = fields.Float('Variable Cost', digits=dp.get_precision('Product Price'), 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") revenue = fields.Float('Revenue', digits=0, diff --git a/addons/membership/models/membership.py b/addons/membership/models/membership.py index dbd53f2c2b494c9037e96f14ce601b4eb5c06c17..c9432c08d837d89e816290038efcc1a958e73c97 100644 --- a/addons/membership/models/membership.py +++ b/addons/membership/models/membership.py @@ -28,7 +28,7 @@ class MembershipLine(models.Model): date = fields.Date(string='Join Date', help="Date on which member has joined the membership") member_price = fields.Float(string='Membership Fee', - digits_compute=dp.get_precision('Product Price'), required=True, + digits=dp.get_precision('Product Price'), required=True, help='Amount for the membership') account_invoice_line = fields.Many2one('account.invoice.line', string='Account Invoice line', readonly=True, ondelete='cascade') account_invoice_id = fields.Many2one('account.invoice', related='account_invoice_line.invoice_id', string='Invoice', readonly=True) diff --git a/addons/membership/wizard/membership_invoice.py b/addons/membership/wizard/membership_invoice.py index 2b70fc74a261984439a76d1bc7fe13ee26caace2..dd77e54f0a1027e9799af523dcfb545c01670b43 100644 --- a/addons/membership/wizard/membership_invoice.py +++ b/addons/membership/wizard/membership_invoice.py @@ -10,7 +10,7 @@ class MembershipInvoice(models.TransientModel): _description = "Membership Invoice" product_id = fields.Many2one('product.product', string='Membership', required=True) - member_price = fields.Float(string='Member Price', digits_compute= dp.get_precision('Product Price'), required=True) + member_price = fields.Float(string='Member Price', digits= dp.get_precision('Product Price'), required=True) @api.onchange('product_id') def onchange_product(self): diff --git a/addons/product/models/product.py b/addons/product/models/product.py index dd7451089ecbca505b9dbee6f13582eaf25b7589..46a2b2426368f44a602df5d16752efe69e0bfe24 100644 --- a/addons/product/models/product.py +++ b/addons/product/models/product.py @@ -97,7 +97,7 @@ class ProductPriceHistory(models.Model): company_id = fields.Many2one('res.company', default=_get_default_company_id, required=True) product_id = fields.Many2one('product.product', 'Product', ondelete='cascade', required=True) datetime = fields.Datetime('Date', default=fields.Datetime.now()) - cost = fields.Float('Cost', digits_compute=dp.get_precision('Product Price')) + cost = fields.Float('Cost', digits=dp.get_precision('Product Price')) class ProductProduct(models.Model): @@ -109,14 +109,14 @@ class ProductProduct(models.Model): price = fields.Float( 'Price', compute='_compute_product_price', - digits_compute=dp.get_precision('Product Price'), inverse='_set_product_price') + digits=dp.get_precision('Product Price'), inverse='_set_product_price') price_extra = fields.Float( 'Variant Price Extra', compute='_compute_product_price_extra', - digits_compute=dp.get_precision('Product Price'), + digits=dp.get_precision('Product Price'), help="This is the sum of the extra price of all attributes") lst_price = fields.Float( 'Sale Price', compute='_compute_product_lst_price', - digits_compute=dp.get_precision('Product Price'), inverse='_set_product_price') + digits=dp.get_precision('Product Price'), inverse='_set_product_price') default_code = fields.Char('Internal Reference', index=True) code = fields.Char('Internal Reference', compute='_compute_product_code') @@ -150,13 +150,13 @@ class ProductProduct(models.Model): standard_price = fields.Float( 'Cost', company_dependent=True, - digits_compute=dp.get_precision('Product Price'), + digits=dp.get_precision('Product Price'), groups="base.group_user", help="Cost of the product template used for standard stock valuation in accounting and used as a base price on purchase orders. " "Expressed in the default unit of measure of the product.") volume = fields.Float('Volume', help="The volume in m3.") weight = fields.Float( - 'Weight', digits_compute=dp.get_precision('Stock Weight'), + 'Weight', digits=dp.get_precision('Stock Weight'), help="The weight of the contents in Kg, not including any packaging, etc.") pricelist_item_ids = fields.Many2many( @@ -589,7 +589,7 @@ class SuppliferInfo(models.Model): 'Minimal Quantity', default=0.0, required=True, help="The minimal quantity to purchase from this vendor, expressed in the vendor Product Unit of Measure if not any, in the default unit of measure of the product otherwise.") price = fields.Float( - 'Price', default=0.0, digits_compute=dp.get_precision('Product Price'), + 'Price', default=0.0, digits=dp.get_precision('Product Price'), required=True, help="The price to purchase a product") company_id = fields.Many2one( 'res.company', 'Company', diff --git a/addons/product/models/product_attribute.py b/addons/product/models/product_attribute.py index 7aba47495145184f4a330296c76005c66236f387..c6ad34015498d3c00290b3c8dafb7a940edd1ef1 100644 --- a/addons/product/models/product_attribute.py +++ b/addons/product/models/product_attribute.py @@ -27,7 +27,7 @@ class ProductAttributevalue(models.Model): product_ids = fields.Many2many('product.product', id1='att_id', id2='prod_id', string='Variants', readonly=True) price_extra = fields.Float( 'Attribute Price Extra', compute='_compute_price_extra', inverse='_set_price_extra', - default=0.0, digits_compute=dp.get_precision('Product Price'), + default=0.0, digits=dp.get_precision('Product Price'), help="Price Extra: Extra price for the variant with this attribute value on sale price. eg. 200 price extra, 1000 + 200 = 1200.") price_ids = fields.One2many('product.attribute.price', 'value_id', 'Attribute Prices', readonly=True) @@ -79,7 +79,7 @@ class ProductAttributePrice(models.Model): product_tmpl_id = fields.Many2one('product.template', 'Product Template', ondelete='cascade', required=True) value_id = fields.Many2one('product.attribute.value', 'Product Attribute Value', ondelete='cascade', required=True) - price_extra = fields.Float('Price Extra', digits_compute=dp.get_precision('Product Price')) + price_extra = fields.Float('Price Extra', digits=dp.get_precision('Product Price')) class ProductAttributeLine(models.Model): diff --git a/addons/product/models/product_pricelist.py b/addons/product/models/product_pricelist.py index b574858c0b9683e422eea1560e793faef3fb7b14..df836d4d0f401e668483316e4f6afc8e9faff743 100644 --- a/addons/product/models/product_pricelist.py +++ b/addons/product/models/product_pricelist.py @@ -325,19 +325,19 @@ class PricelistItem(models.Model): base_pricelist_id = fields.Many2one('product.pricelist', 'Other Pricelist') pricelist_id = fields.Many2one('product.pricelist', 'Pricelist', index=True, ondelete='cascade') price_surcharge = fields.Float( - 'Price Surcharge', digits_compute=dp.get_precision('Product Price'), + 'Price Surcharge', digits=dp.get_precision('Product Price'), help='Specify the fixed amount to add or substract(if negative) to the amount calculated with the discount.') price_discount = fields.Float('Price Discount', default=0, digits=(16, 2)) price_round = fields.Float( - 'Price Rounding', digits_compute=dp.get_precision('Product Price'), + 'Price Rounding', digits=dp.get_precision('Product Price'), 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" "To have prices that end in 9.99, set rounding 10, surcharge -0.01") price_min_margin = fields.Float( - 'Min. Price Margin', digits_compute=dp.get_precision('Product Price'), + 'Min. Price Margin', digits=dp.get_precision('Product Price'), help='Specify the minimum amount of margin over the base price.') price_max_margin = fields.Float( - 'Max. Price Margin', digits_compute=dp.get_precision('Product Price'), + 'Max. Price Margin', digits=dp.get_precision('Product Price'), help='Specify the maximum amount of margin over the base price.') company_id = fields.Many2one( 'res.company', 'Company', @@ -351,7 +351,7 @@ class PricelistItem(models.Model): ('fixed', 'Fix Price'), ('percentage', 'Percentage (discount)'), ('formula', 'Formula')], index=True, default='fixed') - fixed_price = fields.Float('Fixed Price', digits_compute=dp.get_precision('Product Price')) + fixed_price = fields.Float('Fixed Price', digits=dp.get_precision('Product Price')) percent_price = fields.Float('Percentage Price') # functional fields used for usability purposes name = fields.Char( diff --git a/addons/product/models/product_template.py b/addons/product/models/product_template.py index b4569ff789f637f742225df994ccec94578a324b..4c4772db9aa6666ca01866c946af4b414992043c 100644 --- a/addons/product/models/product_template.py +++ b/addons/product/models/product_template.py @@ -59,25 +59,25 @@ class ProductTemplate(models.Model): # price fields price = fields.Float( 'Price', compute='_compute_template_price', inverse='_set_template_price', - digits_compute=dp.get_precision('Product Price')) + digits=dp.get_precision('Product Price')) list_price = fields.Float( 'Sale Price', default=1.0, - digits_compute=dp.get_precision('Product Price'), + digits=dp.get_precision('Product Price'), help="Base price to compute the customer price. Sometimes called the catalog price.") lst_price = fields.Float( 'Public Price', related='list_price', - digits_compute=dp.get_precision('Product Price')) + digits=dp.get_precision('Product Price')) standard_price = fields.Float( 'Cost', compute='_compute_standard_price', inverse='_set_standard_price', search='_search_standard_price', - digits_compute=dp.get_precision('Product Price'), groups="base.group_user", + digits=dp.get_precision('Product Price'), groups="base.group_user", help="Cost of the product, in the default unit of measure of the product.") volume = fields.Float( 'Volume', compute='_compute_volume', inverse='_set_volume', help="The volume in m3.", store=True) weight = fields.Float( - 'Weight', compute='_compute_weight', digits_compute=dp.get_precision('Stock Weight'), + 'Weight', compute='_compute_weight', digits=dp.get_precision('Stock Weight'), inverse='_set_weight', store=True, help="The weight of the contents in Kg, not including any packaging, etc.") diff --git a/addons/stock_account/wizard/stock_change_standard_price.py b/addons/stock_account/wizard/stock_change_standard_price.py index ccda1ee7ee54b02b37ff73b85759043fec0aabde..66b5e8460b9192d7f3135fa84c6be7c8708af9a6 100644 --- a/addons/stock_account/wizard/stock_change_standard_price.py +++ b/addons/stock_account/wizard/stock_change_standard_price.py @@ -10,7 +10,7 @@ class StockChangeStandardPrice(models.TransientModel): _description = "Change Standard Price" new_price = fields.Float( - 'Price', digits_compute=dp.get_precision('Product Price'), required=True, + 'Price', digits=dp.get_precision('Product Price'), required=True, help="If cost price is increased, stock variation account will be debited " "and stock output account will be credited with the value = (difference of amount * quantity available).\n" "If cost price is decreased, stock variation account will be creadited and stock input account will be debited.") diff --git a/addons/stock_landed_costs/models/stock_landed_cost.py b/addons/stock_landed_costs/models/stock_landed_cost.py index e40a295620b0b024113ff4c3d21f225e38918c02..33b69b95e522f2d519471671bd44a94c5e9bedb4 100644 --- a/addons/stock_landed_costs/models/stock_landed_cost.py +++ b/addons/stock_landed_costs/models/stock_landed_cost.py @@ -242,7 +242,7 @@ class LandedCostLine(models.Model): 'stock.landed.cost', 'Landed Cost', required=True, ondelete='cascade') product_id = fields.Many2one('product.product', 'Product', required=True) - price_unit = fields.Float('Cost', digits_compute=dp.get_precision('Product Price'), required=True) + price_unit = fields.Float('Cost', digits=dp.get_precision('Product Price'), required=True) split_method = fields.Selection(product.SPLIT_METHOD, string='Split Method', required=True) account_id = fields.Many2one( 'account.account', 'Account', @@ -273,21 +273,21 @@ class AdjustmentLines(models.Model): product_id = fields.Many2one('product.product', 'Product', required=True) quantity = fields.Float( 'Quantity', default=1.0, - digits_compute=dp.get_precision('Product Unit of Measure'), required=True) + digits=dp.get_precision('Product Unit of Measure'), required=True) weight = fields.Float( 'Weight', default=1.0, - digits_compute=dp.get_precision('Product Unit of Measure')) + digits=dp.get_precision('Product Unit of Measure')) volume = fields.Float( 'Volume', default=1.0, - digits_compute=dp.get_precision('Product Unit of Measure')) + digits=dp.get_precision('Product Unit of Measure')) former_cost = fields.Float( - 'Former Cost', digits_compute=dp.get_precision('Product Price')) + 'Former Cost', digits=dp.get_precision('Product Price')) former_cost_per_unit = fields.Float( 'Former Cost(Per Unit)', compute='_compute_former_cost_per_unit', digits=0, store=True) additional_landed_cost = fields.Float( 'Additional Landed Cost', - digits_compute=dp.get_precision('Product Price')) + digits=dp.get_precision('Product Price')) final_cost = fields.Float( 'Final Cost', compute='_compute_final_cost', digits=0, store=True) diff --git a/addons/website_quote/models/sale_order.py b/addons/website_quote/models/sale_order.py index c0eb2fb1380ec552a35092bd196a25b827581a6e..513185d0075848c942ddda0eb27528b9de4a472c 100644 --- a/addons/website_quote/models/sale_order.py +++ b/addons/website_quote/models/sale_order.py @@ -200,10 +200,10 @@ class SaleOrderOption(models.Model): product_id = fields.Many2one('product.product', 'Product', domain=[('sale_ok', '=', True)]) layout_category_id = fields.Many2one('sale.layout_category', string='Section') website_description = fields.Html('Line Description', sanitize=False, translate=html_translate) - price_unit = fields.Float('Unit Price', required=True, digits_compute=dp.get_precision('Product Price')) - discount = fields.Float('Discount (%)', digits_compute=dp.get_precision('Discount')) + price_unit = fields.Float('Unit Price', required=True, digits=dp.get_precision('Product Price')) + discount = fields.Float('Discount (%)', digits=dp.get_precision('Discount')) uom_id = fields.Many2one('product.uom', 'Unit of Measure ', required=True) - quantity = fields.Float('Quantity', required=True, digits_compute=dp.get_precision('Product UoS'), default=1) + quantity = fields.Float('Quantity', required=True, digits=dp.get_precision('Product UoS'), default=1) sequence = fields.Integer('Sequence', help="Gives the sequence order when displaying a list of suggested product.") @api.onchange('product_id', 'uom_id') diff --git a/addons/website_quote/models/sale_quote.py b/addons/website_quote/models/sale_quote.py index 510c0d1ad7007777d7d7c279c1156a2f24f3d9d3..895c2930d89c573df4bddc8d377c224f136f5164 100644 --- a/addons/website_quote/models/sale_quote.py +++ b/addons/website_quote/models/sale_quote.py @@ -101,10 +101,10 @@ class SaleQuoteOption(models.Model): product_id = fields.Many2one('product.product', 'Product', domain=[('sale_ok', '=', True)], required=True) layout_category_id = fields.Many2one('sale.layout_category', string='Section') website_description = fields.Html('Option Description', translate=html_translate, sanitize=False) - price_unit = fields.Float('Unit Price', required=True, digits_compute=dp.get_precision('Product Price')) - discount = fields.Float('Discount (%)', digits_compute=dp.get_precision('Discount')) + price_unit = fields.Float('Unit Price', required=True, digits=dp.get_precision('Product Price')) + discount = fields.Float('Discount (%)', digits=dp.get_precision('Discount')) uom_id = fields.Many2one('product.uom', 'Unit of Measure ', required=True) - quantity = fields.Float('Quantity', required=True, digits_compute=dp.get_precision('Product UoS'), default=1) + quantity = fields.Float('Quantity', required=True, digits=dp.get_precision('Product UoS'), default=1) @api.onchange('product_id') def _onchange_product_id(self):