Manage customer product in B2B


(Maxime Richez) #1

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


(albert) #2

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

(Sergio Morillo) #3

FYI, we implemented it in product_cross_reference module.


(Cédric Krier) #4

The proposal is based on Issue 6799: suppliers don't relate to product variants - Tryton issue tracker 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.


(Sergi Almacellas Abellana) #5

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


(Cédric Krier) #6

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


(Maxime Richez) #7

I’ve submitted Issue 8133: Proposal of a new module : Sale Product Customer - Tryton issue tracker