Add the supplier info to the product table instead of template table

Registered by EdbO

When you adding a product variant, you aren't able to add a different code / name in the supplier-section. Most of the time you have the same supplier BUT the partner product code and partner product name are different from the "base" product.

When you have e.g. a shirt, you can get it in different colors. Sometimes the supplier says that the minimum quantity of the color red is 10, but the minimum quantity of the color yellow is 20.

Blueprint information

Status:
Not started
Approver:
None
Priority:
Undefined
Drafter:
None
Direction:
Needs approval
Assignee:
None
Definition:
New
Series goal:
None
Implementation:
Unknown
Milestone target:
None

Related branches

Sprints

Whiteboard

I've moved the columns
- seller_delay
- seller_ids

from the product_template to the product_product table. I also had to change the column
- product_id

in the product_supplierinfo table from
- 'product_id' : fields.many2one('product.template', 'Product', required=True, ondelete='cascade', select=True),

to

- 'product_id' : fields.many2one('product.product', 'Product', required=True, ondelete='cascade', select=True),

Creating a new database with the modifications works without any problem, but with an existing database you have to remove manually the constraint between the product_template and product_supplierinfo and create an new constraint between the product_product and the product_supplier.

There is no data loss when you do the above modification because the id's of the product.product and product.template are (always?) the same.

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.