This commit is contained in:
2026-02-02 12:08:46 +01:00
parent 7d89418874
commit 747c2e4a0e
4 changed files with 9 additions and 1 deletions

View File

@@ -9,7 +9,6 @@ import requests
import io
import logging
import json
from trytond.modules.purchase_trade.service import ContractFactory
logger = logging.getLogger(__name__)

View File

@@ -3337,6 +3337,8 @@ class ContractDetail(ModelView):
], 'Price type')
currency_unit = fields.Selection('get_currency_unit',string="Curr/Unit")
reference = fields.Char("Reference")
from_location = fields.Many2One('stock.location',"From location")
to_location = fields.Many2One('stock.location',"To location")
@classmethod
def default_category(cls):

View File

@@ -17,6 +17,7 @@ from operator import itemgetter
import datetime
from collections import defaultdict
from sql import Table
from trytond.modules.purchase_trade.service import ContractFactory
import logging
logger = logging.getLogger(__name__)
@@ -534,6 +535,8 @@ class ShipmentIn(metaclass=PoolMeta):
sale.party = Party.getPartyByName(customer,'CLIENT')
logger.info("SALE_PARTY:%s",sale.party)
sale.reference = reference
sale.from_location = self.from_location
sale.to_location = self.to_location
sale.company = 6
if sale.party.addresses:
sale.invoice_address = sale.party.addresses[0]
@@ -594,6 +597,8 @@ class ShipmentIn(metaclass=PoolMeta):
d.tol_max = 0
d.incoterm = None
d.reference = str(sale.id)
d.from_location = sale.from_location
d.to_location = sale.to_location
d.del_period = None
d.from_del = None
d.to_del = None

View File

@@ -14,5 +14,7 @@
<field name="del_period"/>
<field name="from_del"/>
<field name="to_del"/>
<field name="from_location"/>
<field name="to_location"/>
<field name="category" tree_invisible="1"/>
</tree>