← Back to team overview

openerp-india team mailing list archive

[Bug 1081092] [NEW] [trunk] On module upgrade, view domains on fields with widget='selection' persist on the field

 

Public bug reported:

On the general voucher view (Invoicing -> Journal Entries -> Journal
Vouchers) there is a tax selection. As you can inspect through the
xmlrpc debugging facility, the regular search domain for this is

     [('price_include', '=', False)]

The domain is not prone to modification by onchange methods. However,
after upgrading the account_voucher module, the domain has changed to

    [('price_include', '=', False), ('type_tax_use', 'in', ('sale',
'all')), ('parent_id', '=', False), ('type_tax_use', 'in', ('purchase',
'all')), ('parent_id', '=', False)]

When you restart the server without upgrading, the domain is normal
again.

The bogus domain is in fact a combination of all domains of this field
that various views for account.voucher define a part of. The reason for
the combination is that Model.__view_look_dom() in case of selections
appends the view domain to the field's domain (which is a list
reference) without making a copy.

** Affects: openobject-server
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of OpenERP
Indian Team, which is subscribed to OpenERP Server.
https://bugs.launchpad.net/bugs/1081092

Title:
  [trunk] On module upgrade, view domains on fields with
  widget='selection' persist on the field

Status in OpenERP Server:
  New

Bug description:
  On the general voucher view (Invoicing -> Journal Entries -> Journal
  Vouchers) there is a tax selection. As you can inspect through the
  xmlrpc debugging facility, the regular search domain for this is

       [('price_include', '=', False)]

  The domain is not prone to modification by onchange methods. However,
  after upgrading the account_voucher module, the domain has changed to

      [('price_include', '=', False), ('type_tax_use', 'in', ('sale',
  'all')), ('parent_id', '=', False), ('type_tax_use', 'in',
  ('purchase', 'all')), ('parent_id', '=', False)]

  When you restart the server without upgrading, the domain is normal
  again.

  The bogus domain is in fact a combination of all domains of this field
  that various views for account.voucher define a part of. The reason
  for the combination is that Model.__view_look_dom() in case of
  selections appends the view domain to the field's domain (which is a
  list reference) without making a copy.

To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-server/+bug/1081092/+subscriptions


Follow ups

References