This commit is contained in:
2026-02-04 15:18:06 +01:00
parent 1ebbb874ef
commit 240f35af26

View File

@@ -172,12 +172,13 @@ class Fee(ModelSQL,ModelView):
return 'pay'
def get_unit(self, name=None):
Lot = Pool().get('lot.lot')
if self.lots:
if self.lots[0].line:
return self.lots[0].line.unit
if self.lots[0].sale_line:
return self.lots[0].sale_line.unit
FeeLots = Pool().get('fee.lots')
fl = FeeLots.search(['fee','=',self.id])
if fl:
if fl[0].lot.line:
return fl[0].lot.line.unit
if fl[0].lot.sale_line:
return fl[0].lot.sale_line.unit
@classmethod
@ModelView.button