~roberto-v/openobject-italia/7.0

Viewing all changes in revision 237.

  • Committer: Roberto Gianassi
  • Date: 2014-02-12 08:14:59 UTC
  • Revision ID: roberto@develer.com-20140212081459-2zg05cxtgjf9mdqb
[FIX] Fixed a bug on XML record creation.

If a module (like fetchmail_invoice) containing a partner record to be
preinstalled through a data.xml file was installed after this one, a
bug occurred.
The bug shows because the record is created with the 
default_has_withholding flag to empty and then validation fails.
To solve this, the create function for partners is changed to check for
the presence of that flag in the vals dictionary. If the flag is found,
we assume the creation happens through the UI and so normal checking goes
on. If the flag is not found, we assume the creation happens for an XML
record and so we add an arbitrary, but valid value for the flag.

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: