You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

9 lines
363 B

Fields that want to implement the language default should use the provided method,such as in the below example::
class MyModel(models.Model):
_name = 'my.model'
time_uom_id = fields.Many2one(
string='Time Units',
comodel_name='product.uom',
default=lambda s: s.env['res.lang'].default_uom_by_category('Time'),
)