Manage customer product in B2B

Rational

In B2B sales workflow, we need to provide to customers their own product code and name on the reports (invoice, packing,…)

Proposal

Adding to tryton the management of customer product code and name at the template or variant level.
We should allowed to have many customer code on one product code (many2one).

Implementation

We define 2 new one2many fields “product_customers” : one for the template and another one for the variant. Those fields are sequence_ordered, first item will be used as default value.
We add both fields on the customer tab of the product form.
We add a many2one field on the sale line to select the product customer code (with as default value the first customer product code found)

https://bugs.tryton.org/issue8133

I think this could be a good addition (we already implemented something similar: https://bitbucket.org/nantic/trytond-sale_customer_product).

I have some doubts:

  • Having 2 one2many’s is strange. I admit we have the same problem with supplier information nowadays and I don’t have a good solution for it
  • I don’t understand the need for a sequence in those one2many fields

FYI, we implemented it in product_cross_reference module.

The proposal is based on suppliers don't relate to product variants (#6799) · Issues · Tryton / Tryton · GitLab for supplier.

This is because we do not want to add a unique constraint per party, so it is good to have a way to choose a default.

So I think why not following the same pattern and relate customer codes to templates and leaving the variant for customization?

Because I think the current pattern for product supplier is not good enough by default and customize it properly is complex.

I’ve submitted Issue 8133: RFC : Sale Product Customer - Tryton issue tracker

3 Likes

This topic was automatically closed after 2 days. New replies are no longer allowed.