11.02.26
This commit is contained in:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user