# Product-supplier change since 5.2

**URL:** <https://discuss.tryton.org/t/product-supplier-change-since-5-2/1672>\
**Category:** Developer\
**Created:** [August 21, 2019, 7:37pm UTC](https://discuss.tryton.org/t/product-supplier-change-since-5-2/1672 "2019-08-21T19:37:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![zmichal](https://discuss-cdn.tryton.org/letter_avatar_proxy/v4/letter/z/ed655f/32.png) [@zmichal](https://discuss.tryton.org/u/zmichal)\
**Post date:** [August 21, 2019, 7:37pm UTC](https://discuss.tryton.org/t/product-supplier-change-since-5-2/1672/1 "2019-08-21T19:37:51Z")

</div>

I noticed with 5.2 the product supplier can be bound to product.product not product.template as it was before.

How to achieve this functionality through ORM?  
Until now I was updating with following:

` product_supplier.product = product_template_object`

but, when trying to assign similarly variant:

` product_supplier.product = product_variant_object`

it throws this exception:

```
 *** trytond.model.modelstorage.RequiredValidationError: ('UserError', ('A value is required for field "Product" in "Product Supplier".', ''))                          

```

Thanks for your help,

M+

---

<div class="post-metadata">

**Author:** ![ced](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/ced/32/1237_2.png) [@ced](https://discuss.tryton.org/u/ced)\
**Post date:** [August 21, 2019, 8:28pm UTC](https://discuss.tryton.org/t/product-supplier-change-since-5-2/1672/2 "2019-08-21T20:28:46Z")

</div>

The former field named `product` was renamed to `template` to let define a `product` which actually point to a product.  
See [http://hg.tryton.org/modules/purchase/file/95953e542382/product.py#l229](http://hg.tryton.org/modules/purchase/file/95953e542382/product.py#l229)

---

<div class="post-metadata">

**Author:** ![system](https://discuss-cdn.tryton.org/uploads/default/original/1X/c6f8ec0a40525cdcd50058c734283450a4b3d38b.png) [@system](https://discuss.tryton.org/u/system)\
**Post date:** [September 20, 2019, 8:28pm UTC](https://discuss.tryton.org/t/product-supplier-change-since-5-2/1672/3 "2019-09-20T20:28:51Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
