[FIX] various: fix digits_compute attribute changed to digits in new API
This commit is contained in:
@@ -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):
|
||||
|
||||
@@ -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):
|
||||
|
||||
@@ -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')
|
||||
|
||||
|
||||
@@ -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')
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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):
|
||||
|
||||
@@ -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',
|
||||
|
||||
@@ -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):
|
||||
|
||||
@@ -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(
|
||||
|
||||
@@ -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.")
|
||||
|
||||
|
||||
@@ -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.")
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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')
|
||||
|
||||
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user