- Mailing Lists
- Contributors
- Re: How to propagate custom info/note from Sale Order Line to Purchase Order Line using MTO
Archives
- By thread 1419
-
By date
- August 2019 59
- September 2019 118
- October 2019 165
- November 2019 97
- December 2019 35
- January 2020 58
- February 2020 204
- March 2020 121
- April 2020 172
- May 2020 50
- June 2020 158
- July 2020 85
- August 2020 94
- September 2020 193
- October 2020 277
- November 2020 100
- December 2020 159
- January 2021 38
- February 2021 87
- March 2021 146
- April 2021 73
- May 2021 90
- June 2021 86
- July 2021 123
- August 2021 50
- September 2021 68
- October 2021 66
- November 2021 74
- December 2021 75
- January 2022 98
- February 2022 77
- March 2022 68
- April 2022 31
- May 2022 59
- June 2022 87
- July 2022 141
- August 2022 38
- September 2022 73
- October 2022 152
- November 2022 39
- December 2022 50
- January 2023 93
- February 2023 49
- March 2023 106
- April 2023 47
- May 2023 69
- June 2023 92
- July 2023 64
- August 2023 103
- September 2023 91
- October 2023 101
- November 2023 94
- December 2023 46
- January 2024 75
- February 2024 79
- March 2024 104
- April 2024 63
- May 2024 40
- June 2024 160
- July 2024 80
- August 2024 70
- September 2024 62
- October 2024 121
- November 2024 117
- December 2024 89
- January 2025 59
- February 2025 104
- March 2025 96
- April 2025 107
- May 2025 52
- June 2025 72
- July 2025 60
- August 2025 81
- September 2025 124
- October 2025 63
- November 2025 22
Contributors
Re: How to propagate custom info/note from Sale Order Line to Purchase Order Line using MTO
Re: How to propagate custom info/note from Sale Order Line to Purchase Order Line using MTO
Re: How to propagate custom info/note from Sale Order Line to Purchase Order Line using MTO
In a way yes. This is already done (at least partially) by sale_stock, purchase_stock, sale_purchase. But in this scenario PO(L)s are created by stock rules that are created in between (not using dropshipping). So the PO(L)s are created from these stock rules and not directly from SO(L)s. Maybe there is a link between I do not know. So far I like Pedro's idea the best but have to investigate how and if this would work in my scenario. Best regards Radovan On piatok 13. novembra 2020 16:12:29 CET Yann Papouin wrote: > You want create a link between a POL and SOL to access your specific SOL > fields for each POL ? > > _______________________________________________ > Mailing-List: https://odoo-community.org/groups/contributors-15 [1] > Post to: mailto:contributors@odoo-community.org > Unsubscribe: https://odoo-community.org/groups?unsubscribe [2] > > > > [1] https://odoo-community.org/groups/contributors-15 > [2] https://odoo-community.org/groups?unsubscribe
by Radovan Skolnik - 06:06 - 14 Nov 2020
Reference
-
How to propagate custom info/note from Sale Order Line to Purchase Order Line using MTO
Hello, for our customers we offer standard products but also one-off custom-made stuff that we order from our suppliers. These are for example special tables with individual dimensions for each project. So we have a "template" product (not in the Odoo meaning) that we put into Sale Order and in the special SOL field we specify the dimensions. Now if the customer accepts the offer, Purchase Order is automatically created as we have MTO setup. We do not group POs nor POLs, so each SOL gets its own POL. Now how would I be able to propagate contents of that special SOL field into its apropriate POL? Or should I use any other approach? Thank you very much. Best regards Radovan Skolnik
by Radovan Skolnik - 03:35 - 13 Nov 2020-
Re: How to propagate custom info/note from Sale Order Line to Purchase Order Line using MTO
I was trying this direction. But somehow the second procurement that was creating PO(L)s didn't have those - only the first one creating the move. But will try again. Best regards Radovan On piatok 13. novembra 2020 16:32:10 CET Christian Zöllner wrote: > Hi, for Odoo 12 (maybe for later versions too) you can propagate your > sales order line values by extending > sale.order.line._prepare_procurement_values() Later on - i won't get into > detail ;-) - those values should end up in > purchase.order.line._update_purchase_order_line(). That should be enough > to get values from sales order lines through procurement to purchase order > lines. Best Regards Christian Von: *"Radovan Skolnik" > <radovan@skolnik.info> An: *"Odoo Community Association, (OCA) > Contributors" <contributors@odoo-community.org> Gesendet: *Freitag, 13. > November 2020 15:37:00 Betreff: *How to propagate custom info/note from > Sale Order Line to Purchase Order Line using MTO Hello, for our > customers we offer standard products but also one-off custom-made stuff > that we order from our suppliers. These are for example special tables with > individual dimensions for each project. > So we have a "template" product (not in the Odoo meaning) that we put into > Sale Order and in the special SOL field we specify the dimensions. Now if > the customer accepts the offer, Purchase Order is automatically created as > we have MTO setup. We do not group POs nor POLs, so each SOL gets its own > POL. Now how would I be able to propagate contents of that special SOL > field into its apropriate POL? Or should I use any other approach? > Thank you very much. Best regards > Radovan Skolnik > > > _______________________________________________ Mailing-List: > https://odoo-community.org/groups/contributors-15 [1] Post to: > mailto:contributors@odoo-community.org Unsubscribe: > https://odoo-community.org/groups?unsubscribe [2] -- Christian Zöllner > E-Mail: c.zoellner@intero-technologies.de Intero Technologies GmbH > Heinrich-Heine-Ring 76 D - 18435 Stralsund Tel: +49 (0) 3831 – 44 55 7 - 0 > Fax: +49 (0) 3831 – 44 55 7 - 79 Internet: www.intero-technologies.de > Intero Technologies GmbH • Firmensitz: Heinrich-Heine-Ring 76, 18435 > Stralsund , Deutschland • Registergericht: Amtsgericht Stralsund, HRB 7076 > • Geschäftsführer: Frank Löffler, Lars Lifson • USt-Ident.Nr. DE 251251697 > This eMail and its content is dedicated to the intended recipient only. If > you have received it in error please contact the sender immediately by fax > or return eMail. Please then delete the eMail and any copies of it. > _______________________________________________ > Mailing-List: https://odoo-community.org/groups/contributors-15 [3] > Post to: mailto:contributors@odoo-community.org > Unsubscribe: https://odoo-community.org/groups?unsubscribe [4] > > > > [1] https://odoo-community.org/groups/contributors-15 > [2] https://odoo-community.org/groups?unsubscribe > [3] https://odoo-community.org/groups/contributors-15 > [4] https://odoo-community.org/groups?unsubscribe
by Radovan Skolnik - 06:06 - 14 Nov 2020 -
Re: How to propagate custom info/note from Sale Order Line to Purchase Order Line using MTO
In a way yes. This is already done (at least partially) by sale_stock, purchase_stock, sale_purchase. But in this scenario PO(L)s are created by stock rules that are created in between (not using dropshipping). So the PO(L)s are created from these stock rules and not directly from SO(L)s. Maybe there is a link between I do not know. So far I like Pedro's idea the best but have to investigate how and if this would work in my scenario. Best regards Radovan On piatok 13. novembra 2020 16:12:29 CET Yann Papouin wrote: > You want create a link between a POL and SOL to access your specific SOL > fields for each POL ? > > _______________________________________________ > Mailing-List: https://odoo-community.org/groups/contributors-15 [1] > Post to: mailto:contributors@odoo-community.org > Unsubscribe: https://odoo-community.org/groups?unsubscribe [2] > > > > [1] https://odoo-community.org/groups/contributors-15 > [2] https://odoo-community.org/groups?unsubscribe
by Radovan Skolnik - 06:06 - 14 Nov 2020 -
Re: How to propagate custom info/note from Sale Order Line to Purchase Order Line using MTO
Thanx Ivan, will have a look and adapt if needed. Best regards Radovan On piatok 13. novembra 2020 16:12:26 CET Iván Todorovich wrote: > Forgot to mention that’s 12.0 > Le ven. 13 nov. 2020 à 12:00, Iván Todorovich < ivan.todorovich@gmail.com > [1] > a écrit : Hi Radovan, > We've done something similar like this: > class PurchaseOrderLine(models.Model): > _inherit = 'purchase.order.line' > def _merge_in_existing_line( > self, product_id, product_qty, product_uom, > location_id, name, origin, values): > """ Avoid merging lines if they have different names """ > line_name = ', '.join(values['move_dest_ids'].mapped('name')) > if self.name [2] != line_name: > return False > return super()._merge_in_existing_line( > product_id, product_qty, product_uom, location_id, > name, origin, values) > > class StockRule(models.Model): > _inherit = 'stock.rule' > def _make_po_get_domain(self, values, partner): > """ We want to create one purchase order per origin """ > res = super(StockRule, self)._make_po_get_domain(values, partner) > if 'move_dest_ids' in values: > origin = ', '.join(values['move_dest_ids'].mapped('origin')) > res += (('origin', '=', origin),) > return res > def _prepare_purchase_order_line( > self, product_id, product_qty, product_uom, > values, po, partner): > """ Replace the name with the name in the destination movement, > this way we translate custom attribute values """ > res = super()._prepare_purchase_order_line( > product_id, product_qty, product_uom, values, po, partner) > # Copy name from move_ids, if available > if 'move_dest_ids' in values: > name = ', '.join(values['move_dest_ids'].mapped('name')) > if name: > res.update({'name': name}) > # Copy name from sale order (needed for dropshipping) > elif 'sale_line_id' in values: > sol_id = self.env['sale.order.line'].browse(values['sale_line_id']) > if sol_id: > res.update({'name': sol_id.name [3] }) > return res > Best, > * Iván Todorovich * > El vie., 13 nov. 2020 a las 11:58, Radovan Skolnik (< radovan@skolnik.info > [4] >) escribió: Hello Daniel, > but isn't this used for Services only? I have tried it but it never gets > called with Products. With Products the flow goes through Procurements. > Best regards > Radovan > > On piatok 13. novembra 2020 15:46:48 CET Daniel Reis wrote: > > Hello, > > > > You can extend the "_purchase_service_prepare_order_values" method, > > originally declared at addons/sale_purchase/models/sale_order.py. > > That prepares the data used to create the POL. > > > > Thanks > > Daniel > > > > On 13/11/2020 14:37, Radovan Skolnik > > wrote: > > > > > > Hello, > > for our customers we offer standard products but also one-off custom-made > > stuff that we order from our suppliers. These are for example special > > tables with individual dimensions for each project. > > So we have a "template" product (not in the Odoo meaning) that we put into > > Sale Order and in the special SOL field we specify the dimensions. Now if > > the customer accepts the offer, Purchase Order is automatically created as > > we have MTO setup. We do not group POs nor POLs, so each SOL gets its own > > POL. Now how would I be able to propagate contents of that special SOL > > field into its apropriate POL? Or should I use any other approach? > > Thank you very much. Best regards > > Radovan Skolnik > > > > > > _______________________________________________ > > Mailing-List: https://odoo-community.org/groups/contributors-15 [5] [1] > > Post to: mailto: contributors@odoo-community.org [6] [2] > > Unsubscribe: https://odoo-community.org/groups?unsubscribe [7] [3] > > > > > > > > > > _______________________________________________ > > Mailing-List: https://odoo-community.org/groups/contributors-15 [8] [4] > > Post to: mailto: contributors@odoo-community.org [9] > > Unsubscribe: https://odoo-community.org/groups?unsubscribe [10] [5] > > > > > > > > [1] https://odoo-community.org/groups/contributors-15 [11] > > [2] mailto: contributors@odoo-community.org [12] > > [3] https://odoo-community.org/groups?unsubscribe [13] > > [4] https://odoo-community.org/groups/contributors-15 [14] > > [5] https://odoo-community.org/groups?unsubscribe [15] > > _______________________________________________ > Mailing-List: https://odoo-community.org/groups/contributors-15 [16] > Post to: mailto: contributors@odoo-community.org [17] > Unsubscribe: https://odoo-community.org/groups?unsubscribe [18] > > -- > > * Iván Todorovich * > _______________________________________________ > Mailing-List: https://odoo-community.org/groups/contributors-15 [19] > Post to: mailto:contributors@odoo-community.org > Unsubscribe: https://odoo-community.org/groups?unsubscribe [20] > > > > [1] mailto:ivan.todorovich@gmail.com > [2] http://self.name > [3] http://sol_id.name > [4] mailto:radovan@skolnik.info > [5] https://odoo-community.org/groups/contributors-15 > [6] mailto:contributors@odoo-community.org > [7] https://odoo-community.org/groups?unsubscribe > [8] https://odoo-community.org/groups/contributors-15 > [9] mailto:contributors@odoo-community.org > [10] https://odoo-community.org/groups?unsubscribe > [11] https://odoo-community.org/groups/contributors-15 > [12] mailto:contributors@odoo-community.org > [13] https://odoo-community.org/groups?unsubscribe > [14] https://odoo-community.org/groups/contributors-15 > [15] https://odoo-community.org/groups?unsubscribe > [16] https://odoo-community.org/groups/contributors-15 > [17] mailto:contributors@odoo-community.org > [18] https://odoo-community.org/groups?unsubscribe > [19] https://odoo-community.org/groups/contributors-15 > [20] https://odoo-community.org/groups?unsubscribe
by Radovan Skolnik - 05:55 - 14 Nov 2020 -
Re: How to propagate custom info/note from Sale Order Line to Purchase Order Line using MTO
Hi,for Odoo 12 (maybe for later versions too) you can propagate your sales order line values by extending sale.order.line._prepare_procurement_values()Later on - i won't get into detail ;-) - those values should end up in purchase.order.line._update_purchase_order_line().That should be enough to get values from sales order lines through procurement to purchase order lines.Best RegardsChristianVon: "Radovan Skolnik" <radovan@skolnik.info>
An: "Odoo Community Association, (OCA) Contributors" <contributors@odoo-community.org>
Gesendet: Freitag, 13. November 2020 15:37:00
Betreff: How to propagate custom info/note from Sale Order Line to Purchase Order Line using MTOHello, for our customers we offer standard products but also one-off custom-made stuff that we order from our suppliers. These are for example special tables with individual dimensions for each project. So we have a "template" product (not in the Odoo meaning) that we put into Sale Order and in the special SOL field we specify the dimensions. Now if the customer accepts the offer, Purchase Order is automatically created as we have MTO setup. We do not group POs nor POLs, so each SOL gets its own POL. Now how would I be able to propagate contents of that special SOL field into its apropriate POL? Or should I use any other approach? Thank you very much. Best regards Radovan Skolnik
_______________________________________________
Mailing-List: https://odoo-community.org/groups/contributors-15
Post to: mailto:contributors@odoo-community.org
Unsubscribe: https://odoo-community.org/groups?unsubscribe
--Christian Zöllner
E-Mail: c.zoellner@intero-technologies.de
Intero Technologies GmbH
Heinrich-Heine-Ring 76
D - 18435 Stralsund
Tel: +49 (0) 3831 – 44 55 7 - 0
Fax: +49 (0) 3831 – 44 55 7 - 79
Internet: www.intero-technologies.de
Intero Technologies GmbH • Firmensitz: Heinrich-Heine-Ring 76, 18435 Stralsund , Deutschland • Registergericht: Amtsgericht Stralsund, HRB 7076 • Geschäftsführer: Frank Löffler, Lars Lifson • USt-Ident.Nr. DE 251251697
This eMail and its content is dedicated to the intended recipient only. If you have received it in error please contact the sender immediately by fax or return eMail. Please then delete the eMail and any copies of it.
by Christian Zöllner - 04:31 - 13 Nov 2020 -
Re: How to propagate custom info/note from Sale Order Line to Purchase Order Line using MTO
You want create a link between a POL and SOL to access your specific SOL fields for each POL ?
by Yann Papouin - 04:11 - 13 Nov 2020
-