Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
3 Odpowiedzi
3376 Widoki

I want to make a module that copies a sale.order.line comment to the purchase.order.line 

Does anyone know where exactly in the code this conversion is done ?


OCA has a https://github.com/OCA/sale-reporting/tree/14.0/sale_comment_template module but also this comment does not migrate into the purchase order.

Awatar
Odrzuć
Najlepsza odpowiedź

Hello Jaco, its very likely that the customer needs to bring some information from the sale.order.line to the purchase.order.line and even more when we're using de MTO route in our product. This is not avaliable in odoo standard because we have several lines in our sales order than can be one line in the purchase order ej:

sale order line 1: t-shirt with the comment "customized with an odoo logo" with a $5 sales price

sale order line 2: t-shirt with the comment "customized with a coca-cola logo" with a $10 sales price

On our purchase order we will have a one and only line:

line 1: 2 t-shirts

Even though we bring our field "sale.order.item" to the purchase order line you'll need to select the sale.order.line manually because this fields are many2many and there's no way that odoo figures out or knows automatically which sale order line we are talking about regarding that we could have 1 purchase line per multiple sales lines.

There's a forum entry that explains a workaround for service type products which have the reordering configuration as "subcontract service" in case you're talking about services. 

Here's the link: https://accounts.odoo.com/es_ES/forum/ayuda-1/how-to-define-the-po-price-from-the-so-v14-and-v15-199906

Hope this information helps you.

Regards,



Awatar
Odrzuć
Autor

I can write a module, adding an extra field on both models, but i dont really find where in the code the purchase.order.lines are created from the sale.order.lines

Powiązane posty Odpowiedzi Widoki Czynność
1
cze 25
1773
1
maj 25
1526
1
maj 25
1777
4
maj 25
2912
1
lut 25
6951