17.03.26
This commit is contained in:
@@ -54,25 +54,7 @@ class PartyExecutionPlace(ModelSQL,ModelView):
|
|||||||
states={
|
states={
|
||||||
'readonly': Eval('mode') != 'ppack',
|
'readonly': Eval('mode') != 'ppack',
|
||||||
})
|
})
|
||||||
currency_unit = fields.Selection('get_currency_unit',string="Curr/Unit")
|
|
||||||
|
|
||||||
@staticmethod
|
|
||||||
def get_currency_unit():
|
|
||||||
Currency = Pool().get('currency.currency')
|
|
||||||
Uom = Pool().get('product.uom')
|
|
||||||
|
|
||||||
result = []
|
|
||||||
currencies = Currency.search([('concatenate','=',True)])
|
|
||||||
units = Uom.search([('concatenate','=',True)])
|
|
||||||
result.append(("0_5","USC/lb"))
|
|
||||||
result.append(("0_37","USC/mt"))
|
|
||||||
for c in currencies:
|
|
||||||
for u in units:
|
|
||||||
key = "%s_%s" % (c.id, u.id)
|
|
||||||
value = "%s / %s" % (c.name, u.symbol or u.name)
|
|
||||||
result.append((key, value))
|
|
||||||
return result
|
|
||||||
|
|
||||||
class Party(metaclass=PoolMeta):
|
class Party(metaclass=PoolMeta):
|
||||||
__name__ = 'party.party'
|
__name__ = 'party.party'
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user