details:   https://code.tryton.org/tryton/commit/b893cdfbdbe1
branch:    7.0
user:      Sergi Almacellas Abellana <[email protected]>
date:      Fri Sep 19 09:12:53 2025 +0200
description:
        Leave the unit price field empty for the purchase line of production 
outsourcing

        Since changeset 65be15fb7d8a the unit price is not required until
        the purchase is confirmed

        Closes #14245
        (grafted from d45eca694b79dbb9ec12400644056e2247aa297d)
diffstat:

 modules/production_outsourcing/production.py |  3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)

diffs (20 lines):

diff -r d10f9e11d886 -r b893cdfbdbe1 
modules/production_outsourcing/production.py
--- a/modules/production_outsourcing/production.py      Thu Mar 27 13:39:04 
2025 +0100
+++ b/modules/production_outsourcing/production.py      Fri Sep 19 09:12:53 
2025 +0200
@@ -1,7 +1,6 @@
 # This file is part of Tryton.  The COPYRIGHT file at the top level of
 # this repository contains the full copyright notices and license terms.
 
-from decimal import Decimal
 from itertools import groupby
 
 from trytond.i18n import gettext
@@ -217,8 +216,6 @@
             factor * self.routing.supplier_quantity)
         line.purchase = purchase
         line.on_change_product()
-        if line.unit_price is None:
-            line.unit_price = round_price(Decimal(0))
         return line
 
     @classmethod

Reply via email to