Hello, I have a model which has inherited product.template and in this model I have a One2many field which has an Integer field. The thing is that I have a wizard which checks for this integer records and makes some checking.
At the moment I'm accessing the records like this:
But whenever I call from the wizard it adds up all existing records wile I want to access records for the product I'm.model = self.env['product.template'].search([])for record in self:
sum_installments = 0
for records in model:
for ids in records.installments_ids:
sum_installments += ids.value
So how do I get only the records which has the current document I'm in?