This commit is contained in:
2026-02-11 07:26:48 +01:00
parent 1eb86892de
commit e37cd4a1cc
7 changed files with 51 additions and 15 deletions

View File

@@ -32,6 +32,17 @@ logger = logging.getLogger(__name__)
class Location(metaclass=PoolMeta):
__name__ = 'stock.location'
def get_places(self,name):
t = Table('places')
cursor = Transaction().connection.cursor()
cursor.execute(*t.select(
t.PLACE_KEY,
where=t.PLACE_NAME.ilike(f'%{name}%')
))
rows = cursor.fetchall()
if rows:
return int(rows[0][0])
@classmethod
def getLocationByName(cls, location, type):
location = location.upper()
@@ -436,6 +447,7 @@ class ShipmentIn(metaclass=PoolMeta):
add_invoice = fields.Boolean("Add invoice")
returned_id = fields.Char("Returned ID")
result = fields.Char("Result",readonly=True)
agent = fields.Many2One('party.party',"Booking Agent")
@classmethod
def __setup__(cls):