Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda

Requirement: The number of decimal point should get changed in view with respect to another value of a field. (Using Odoo 18)

Example:
model 'B' has two field

  1. value = fields.Float(digits=(4,6))
  2. decimal_id = fields.Many2one('custom_module')

model 'A' has two fields:-

  1. number_of_decimal = fields.Selection([('one', 1), ('two', 2), ('three', 3)]).
  2. value_ids = fields.One2many('custom_module.B', 'decimal_id')

Now in model A's form view, we have number_of_decimal and value_ids. the number of decimals in value, should be equal to one if the number_of_decimal = 'one'. number of decimals in value, should be equal to two if the number_of_decimal == 'two'


Avatar
Buang
Post Terkait Replies Tampilan Aktivitas
0
Jul 19
4262
1
Jul 22
2412
1
Des 20
277
1
Mar 15
4034
1
Sep 21
3018