prepare test for porting

This commit is contained in:
Frederik Jaeckel 2023-06-02 20:40:12 +02:00
parent 619a17bcd6
commit 3467c08895
16 changed files with 690 additions and 373 deletions

View file

@ -174,7 +174,7 @@ class Line(SecondCurrencyMixin, MemCacheIndexMx, Workflow, ModelSQL, ModelView):
reconciliation = fields.Many2One(
string='Reconciliation', readonly=True,
model_name='cashbook.recon', ondelete='SET NULL',
domain=[('cashbook.id', '=', Eval('cashbook'))],
domain=[('cashbook.id', '=', Eval('cashbook', -1))],
depends=['cashbook'],
states={
'invisible': ~Bool(Eval('reconciliation')),
@ -487,7 +487,9 @@ class Line(SecondCurrencyMixin, MemCacheIndexMx, Workflow, ModelSQL, ModelView):
return '%(date)s|%(type)s|%(amount)s %(symbol)s|%(desc)s [%(category)s]' % {
'date': Report.format_date(self.date),
'desc': (self.description or '-')[:40],
'amount': Report.format_number(credit - debit, None),
'amount': Report.format_number(
credit - debit, None,
digits=getattr(self.currency, 'digits', 2)),
'symbol': getattr(self.currency, 'symbol', '-'),
'category': self.category_view
if self.bookingtype in ['in', 'out']