Skip to content

Commit

Permalink
FIX warning in mass editing module when read (OCA#741)
Browse files Browse the repository at this point in the history
  • Loading branch information
bealdav authored and pedrobaeza committed Feb 22, 2017
1 parent 668095d commit b6a6464
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions mass_editing/wizard/mass_editing_wizard.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,3 +256,16 @@ def create(self, vals):
@api.multi
def action_apply(self):
return {'type': 'ir.actions.act_window_close'}

def read(self, fields, load='_classic_read'):
""" Without this call, dynamic fields build by fields_view_get()
generate a log warning, i.e.:
odoo.models:mass.editing.wizard.read() with unknown field 'myfield'
odoo.models:mass.editing.wizard.read()
with unknown field 'selection__myfield'
"""
real_fields = fields
if fields:
# We remove fields which are not in _fields
real_fields = [x for x in fields if x in self._fields]
return super(MassEditingWizard, self).read(real_fields, load=load)

0 comments on commit b6a6464

Please sign in to comment.