[FIX] default_gets: avoid using shadowname 'fields'

This commit is contained in:
mreficent
2019-11-29 18:30:43 +01:00
committed by ahenriquez
parent 363e1009bc
commit c86a3bf221
2 changed files with 4 additions and 4 deletions

View File

@@ -10,8 +10,8 @@ class RmaAddInvoice(models.TransientModel):
_description = 'Wizard to add rma lines' _description = 'Wizard to add rma lines'
@api.model @api.model
def default_get(self, fields): def default_get(self, fields_list):
res = super(RmaAddInvoice, self).default_get(fields) res = super(RmaAddInvoice, self).default_get(fields_list)
rma_obj = self.env['rma.order'] rma_obj = self.env['rma.order']
rma_id = self.env.context['active_ids'] or [] rma_id = self.env.context['active_ids'] or []
active_model = self.env.context['active_model'] active_model = self.env.context['active_model']

View File

@@ -32,13 +32,13 @@ class RmaRefund(models.TransientModel):
return values return values
@api.model @api.model
def default_get(self, fields): def default_get(self, fields_list):
"""Default values for wizard, if there is more than one supplier on """Default values for wizard, if there is more than one supplier on
lines the supplier field is empty otherwise is the unique line lines the supplier field is empty otherwise is the unique line
supplier. supplier.
""" """
context = self._context.copy() context = self._context.copy()
res = super(RmaRefund, self).default_get(fields) res = super(RmaRefund, self).default_get(fields_list)
rma_line_obj = self.env['rma.order.line'] rma_line_obj = self.env['rma.order.line']
rma_line_ids = self.env.context['active_ids'] or [] rma_line_ids = self.env.context['active_ids'] or []
active_model = self.env.context['active_model'] active_model = self.env.context['active_model']