@ -3,7 +3,7 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{'name': 'Partner Changesets',
'version': '10.0.1.0.0',
'version': '10.0.1.0.1',
'author': 'Camptocamp, Odoo Community Association (OCA)',
'license': 'AGPL-3',
'category': 'Sales Management',
@ -27,7 +27,9 @@ class ResPartner(models.Model):
@api.multi
def write(self, values):
if self.env.context.get('__no_changeset'):
if (self.env.context.get('__no_changeset') or
self.env.context.get('test_enable') and
not self.env.context.get('test_partner_changeset')):
return super(ResPartner, self).write(values)
else:
changeset_model = self.env['res.partner.changeset']
@ -30,6 +30,8 @@ class TestChangesetOrigin(ChangesetMixin, common.TransactionCase):
self.partner = self.env['res.partner'].create({
'name': 'X',
})
# Add context for this test for compatibility with other modules' tests
self.partner = self.partner.with_context(test_partner_changeset=True)
def test_origin_value_of_change_with_apply(self):
""" Origin field is read from the parter or 'old' - with apply