{"action":"closed","issue":{"url":"https://api.github.com/repos/odoomrp/odoomrp-wip/issues/1219","repository_url":"https://api.github.com/repos/odoomrp/odoomrp-wip","labels_url":"https://api.github.com/repos/odoomrp/odoomrp-wip/issues/1219/labels{/name}","comments_url":"https://api.github.com/repos/odoomrp/odoomrp-wip/issues/1219/comments","events_url":"https://api.github.com/repos/odoomrp/odoomrp-wip/issues/1219/events","html_url":"https://github.com/odoomrp/odoomrp-wip/issues/1219","id":153796776,"number":1219,"title":"product_variants","user":{"login":"jaferrer","id":16543165,"avatar_url":"https://avatars.githubusercontent.com/u/16543165?v=3","gravatar_id":"","url":"https://api.github.com/users/jaferrer","html_url":"https://github.com/jaferrer","followers_url":"https://api.github.com/users/jaferrer/followers","following_url":"https://api.github.com/users/jaferrer/following{/other_user}","gists_url":"https://api.github.com/users/jaferrer/gists{/gist_id}","starred_url":"https://api.github.com/users/jaferrer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jaferrer/subscriptions","organizations_url":"https://api.github.com/users/jaferrer/orgs","repos_url":"https://api.github.com/users/jaferrer/repos","events_url":"https://api.github.com/users/jaferrer/events{/privacy}","received_events_url":"https://api.github.com/users/jaferrer/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-05-09T15:00:09Z","updated_at":"2016-05-09T15:02:19Z","closed_at":"2016-05-09T15:02:19Z","body":"Hello,\r\n\r\nAfter upgrading to the latest,  cannot create new product variants.\r\n\r\nA constraint message appears 'Mixing apples and oranges: product.attribute.line(1,) - product.attribute(1,)'\r\n\r\nBefore it worked fine.\r\n\r\nNow checking out '380b649230760107748f86970662ce4c2c699cb1' (the previous one) and works again !!\r\n\r\n\r\nTraceback (most recent call last):\r\n  File \"/opt/apps/v8/odoo/openerp/http.py\", line 539, in _handle_exception\r\n    return super(JsonRequest, self)._handle_exception(exception)\r\n  File \"/opt/apps/v8/odoo/openerp/http.py\", line 576, in dispatch\r\n    result = self._call_function(**self.params)\r\n  File \"/opt/apps/v8/odoo/openerp/http.py\", line 312, in _call_function\r\n    return checked_call(self.db, *args, **kwargs)\r\n  File \"/opt/apps/v8/odoo/openerp/service/model.py\", line 118, in wrapper\r\n    return f(dbname, *args, **kwargs)\r\n  File \"/opt/apps/v8/odoo/openerp/http.py\", line 309, in checked_call\r\n    return self.endpoint(*a, **kw)\r\n  File \"/opt/apps/v8/odoo/openerp/http.py\", line 805, in __call__\r\n    return self.method(*args, **kw)\r\n  File \"/opt/apps/v8/odoo/openerp/http.py\", line 405, in response_wrap\r\n    response = f(*args, **kw)\r\n  File \"/opt/apps/v8/odoo/addons/web/controllers/main.py\", line 944, in call_kw\r\n    return self._call_kw(model, method, args, kwargs)\r\n  File \"/opt/apps/v8/odoo/addons/web/controllers/main.py\", line 936, in _call_kw\r\n    return getattr(request.registry.get(model), method)(request.cr, request.uid, *args, **kwargs)\r\n  File \"/opt/apps/v8/odoo/openerp/api.py\", line 268, in wrapper\r\n    return old_api(self, *args, **kwargs)\r\n  File \"/opt/apps/v8/odoo/addons/stock/product.py\", line 502, in write\r\n    return super(product_template, self).write(cr, uid, ids, vals, context=context)\r\n  File \"/opt/apps/v8/odoo/openerp/api.py\", line 268, in wrapper\r\n    return old_api(self, *args, **kwargs)\r\n  File \"/opt/apps/v8/odoo/openerp/api.py\", line 399, in old_api\r\n    result = method(recs, *args, **kwargs)\r\n  File \"/opt/apps/v8/odoomrp-wip/product_variants_no_automatic_creation/models/product_template.py\", line 41, in write\r\n    res = super(ProductTemplate, self).write(values)\r\n  File \"/opt/apps/v8/odoo/openerp/api.py\", line 266, in wrapper\r\n    return new_api(self, *args, **kwargs)\r\n  File \"/opt/apps/v8/odoo/openerp/api.py\", line 592, in new_api\r\n    result = method(self._model, cr, uid, self.ids, *args, **old_kwargs)\r\n  File \"/opt/apps/v8/odoo/addons/product/product.py\", line 774, in write\r\n    self.create_variant_ids(cr, uid, ids, context=context)\r\n  File \"/opt/apps/v8/odoo/openerp/api.py\", line 268, in wrapper\r\n    return old_api(self, *args, **kwargs)\r\n  File \"/opt/apps/v8/odoo/openerp/api.py\", line 399, in old_api\r\n    result = method(recs, *args, **kwargs)\r\n  File \"/opt/apps/v8/odoomrp-wip/product_variants_no_automatic_creation/models/product_template.py\", line 63, in create_variant_ids\r\n    super(ProductTemplate, tmpl).create_variant_ids()\r\n  File \"/opt/apps/v8/odoo/openerp/api.py\", line 266, in wrapper\r\n    return new_api(self, *args, **kwargs)\r\n  File \"/opt/apps/v8/odoo/openerp/api.py\", line 592, in new_api\r\n    result = method(self._model, cr, uid, self.ids, *args, **old_kwargs)\r\n  File \"/opt/apps/v8/odoo/addons/product/product.py\", line 727, in create_variant_ids\r\n    id = product_obj.create(cr, uid, values, context=ctx)\r\n  File \"/opt/apps/v8/odoo/openerp/api.py\", line 268, in wrapper\r\n    return old_api(self, *args, **kwargs)\r\n  File \"/opt/apps/v8/odoo/openerp/api.py\", line 372, in old_api\r\n    result = method(recs, *args, **kwargs)\r\n  File \"/opt/apps/v8/odoomrp-wip/product_variants_no_automatic_creation/models/product_product.py\", line 98, in create\r\n    return super(ProductProduct, obj).create(vals)\r\n  File \"/opt/apps/v8/odoo/openerp/api.py\", line 266, in wrapper\r\n    return new_api(self, *args, **kwargs)\r\n  File \"/opt/apps/v8/odoo/openerp/api.py\", line 508, in new_api\r\n    result = method(self._model, cr, uid, *args, **old_kwargs)\r\n  File \"/opt/apps/v8/odoo/addons/product/product.py\", line 1199, in create\r\n    return super(product_product, self).create(cr, uid, vals, context=ctx)\r\n  File \"/opt/apps/v8/odoo/openerp/api.py\", line 268, in wrapper\r\n    return old_api(self, *args, **kwargs)\r\n  File \"/opt/apps/v8/odoo/addons/mail/mail_thread.py\", line 381, in create\r\n    thread_id = super(mail_thread, self).create(cr, uid, values, context=context)\r\n  File \"/opt/apps/v8/odoo/openerp/api.py\", line 268, in wrapper\r\n    return old_api(self, *args, **kwargs)\r\n  File \"/opt/apps/v8/odoo/openerp/api.py\", line 372, in old_api\r\n    result = method(recs, *args, **kwargs)\r\n  File \"/opt/apps/v8/odoo/openerp/models.py\", line 4094, in create\r\n    record = self.browse(self._create(old_vals))\r\n  File \"/opt/apps/v8/odoo/openerp/api.py\", line 266, in wrapper\r\n    return new_api(self, *args, **kwargs)\r\n  File \"/opt/apps/v8/odoo/openerp/api.py\", line 508, in new_api\r\n    result = method(self._model, cr, uid, *args, **old_kwargs)\r\n  File \"/opt/apps/v8/odoo/openerp/models.py\", line 4285, in _create\r\n    recs._validate_fields(vals)\r\n  File \"/opt/apps/v8/odoo/openerp/api.py\", line 266, in wrapper\r\n    return new_api(self, *args, **kwargs)\r\n  File \"/opt/apps/v8/odoo/openerp/models.py\", line 1281, in _validate_fields\r\n    raise ValidationError(\"Error while validating constraint\\n\\n%s\" % tools.ustr(e))\r\nValidationError: ('ValidateError', u'Error while validating constraint\\n\\nValueError\\nMixing apples and oranges: product.attribute.line(1,) - product.attribute(1,)')\r\n2016-05-09 14:48:39,464 5283 INFO TEST werkzeug: 127.0.0.1 - - [09/May/2016 14:48:39] \"POST /web/dataset/call_kw/product.template/write HTTP/1.1\" 200 -\r\n"}}