11.02.26
This commit is contained in:
@@ -76,12 +76,12 @@ class Party(metaclass=PoolMeta):
|
|||||||
if sp:
|
if sp:
|
||||||
return round(((sp[0].cost / Decimal(100)) * Decimal(2.2046)),4)
|
return round(((sp[0].cost / Decimal(100)) * Decimal(2.2046)),4)
|
||||||
|
|
||||||
def get_alf(self,name):
|
def get_alf(self):
|
||||||
t = Table('alf')
|
t = Table('alf')
|
||||||
cursor = Transaction().connection.cursor()
|
cursor = Transaction().connection.cursor()
|
||||||
cursor.execute(*t.select(
|
cursor.execute(*t.select(
|
||||||
t.ALF_CODE,
|
t.ALF_CODE,
|
||||||
where=t.SHORT_NAME.ilike(f'%{name}%')
|
where=t.SHORT_NAME.ilike(f'%{self.name}%')
|
||||||
))
|
))
|
||||||
rows = cursor.fetchall()
|
rows = cursor.fetchall()
|
||||||
if rows:
|
if rows:
|
||||||
|
|||||||
@@ -32,12 +32,12 @@ logger = logging.getLogger(__name__)
|
|||||||
class Location(metaclass=PoolMeta):
|
class Location(metaclass=PoolMeta):
|
||||||
__name__ = 'stock.location'
|
__name__ = 'stock.location'
|
||||||
|
|
||||||
def get_places(self,name):
|
def get_places(self):
|
||||||
t = Table('places')
|
t = Table('places')
|
||||||
cursor = Transaction().connection.cursor()
|
cursor = Transaction().connection.cursor()
|
||||||
cursor.execute(*t.select(
|
cursor.execute(*t.select(
|
||||||
t.PLACE_KEY,
|
t.PLACE_KEY,
|
||||||
where=t.PLACE_NAME.ilike(f'%{name}%')
|
where=t.PLACE_NAME.ilike(f'%{self.name}%')
|
||||||
))
|
))
|
||||||
rows = cursor.fetchall()
|
rows = cursor.fetchall()
|
||||||
if rows:
|
if rows:
|
||||||
|
|||||||
Reference in New Issue
Block a user