Can someone explain why fields_view_get is not being triggered ? Even in debug. I'm using v9
class AdjustmentLines(models.Model):
_name = 'load.valuation.adjustment.lines'
_description = 'Stock Valuation Adjustment Lines'
name = fields.Char('Description', compute='_compute_name', store=True)
cost_id = fields.Many2one('load.load', 'Landed Cost', ondelete='cascade', required=True)
cost_line_id = fields.Many2one('load.landed.cost.lines', 'Cost Line', readonly=True)
move_id = fields.Many2one('stock.move', 'Stock Move', readonly=True)
product_id = fields.Many2one('product.product', 'Product', required=True)
quantity = fields.Float('Quantity', default=1.0, digits=dp.get_precision('Product Unit of Measure'), required=True)
weight = fields.Float('Weight', default=1.0, digits=dp.get_precision('Product Unit of Measure'))
test = fields.Char(string='Test', default='aaa')
volume = fields.Float('Volume', default=1.0, digits=dp.get_precision('Product Unit of Measure'))
former_cost = fields.Float('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=dp.get_precision('Product Price'))
final_cost = fields.Float('Final Cost', compute='_compute_final_cost', digits=0, store=True)
def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False, submenu=False):
#override of fields_view_get in order to replace the name field to product template
if context is None:
context={}
res = super(AdjustmentLines, self).fields_view_get(cr, uid, view_id=view_id, view_type=view_type, context=context, toolbar=toolbar, submenu=submenu)
(...)