May your product is marked as "consumable" or type "Service" or "Assets" regards
Am Samstag, 2. Mai 2015 11:37:36 UTC+2 schrieb [email protected]: > > Hii, > > I am trying to add a existing product to the stock.inventory.line and > save it. But i am getting this error, > UserError: ('UserError', (u'The value of the field "Product" on "Stock > Inventory Line" is not valid according to its domain.', '')) > > > > > I tried to check if my error is due to the wrong product, but when i added > the same product to the invoice it did accept it without any issues. > > *the error:* > > In [64]: line.save() > --------------------------------------------------------------------------- > UserError Traceback (most recent call last) > <ipython-input-64-a73bd6e03d6e> in <module>() > ----> 1 line.save() > > /usr/local/lib/python2.7/dist-packages/proteus/__init__.pyc in newfunc(*args, > **kwargs) > 100 def newfunc(*args, **kwargs): > 101 if instance: > --> 102 return self.func(owner, [instance], *args, **kwargs) > 103 else: > 104 return self.func(owner, *args, **kwargs) > > /usr/local/lib/python2.7/dist-packages/proteus/__init__.pyc in save(cls, > records) > 747 if create: > 748 values = [r._get_values() for r in create] > --> 749 ids = proxy.create(values, context) > 750 for record, id_ in zip(create, ids): > 751 record.id = id_ > > /usr/local/lib/python2.7/dist-packages/proteus/config.pyc in __call__(self, > *args) > 171 meth = getattr(self._object, self._name) > 172 if not hasattr(meth, 'im_self') or meth.im_self: > --> 173 result = rpc.result(meth(*args, **kwargs)) > 174 else: > 175 assert rpc.instantiate == 0 > > /home/projects/new/test/FSERP/trytond/trytond/model/modelsql.pyc in > create(cls, vlist) > 506 records = cls.browse(new_ids) > 507 for sub_records in grouped_slice(records, cache_size()): > --> 508 cls._validate(sub_records) > 509 > 510 field_names = cls._fields.keys() > > /home/projects/new/test/FSERP/trytond/trytond/model/modelstorage.pyc in > _validate(cls, records, field_names) > 967 continue > 968 > --> 969 validate_domain(field) > 970 > 971 def required_test(value, field_name): > > /home/projects/new/test/FSERP/trytond/trytond/model/modelstorage.pyc in > validate_domain(field) > 926 > 927 for domain, sub_records in domains.iteritems(): > --> 928 validate_relation_domain(field, sub_records, > Relation, domain) > 929 > 930 def validate_relation_domain(field, records, Relation, > domain): > > /home/projects/new/test/FSERP/trytond/trytond/model/modelstorage.pyc in > validate_relation_domain(field, records, Relation, domain) > 949 if sub_relations != set( > > ...
