Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
3 Risposte
3040 Visualizzazioni

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.

Avatar
Abbandona
Risposta migliore

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,



Avatar
Abbandona
Autore

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

Post correlati Risposte Visualizzazioni Attività
1
giu 25
1271
1
mag 25
1183
1
mag 25
1459
4
mag 25
2565
1
feb 25
6542