Tryton - Issues

 

Message46000

Author semarie
Recipients pokoli
Date 2019-01-17.09:43:15
Content
- when the Invoice is reconcilied, Reconciliation will call Invoice.process() method [1]
- the Invoice.process method only care about Invoice in 'posted' or 'paid' state [2]

so I see two possibilities:
- in Invoice.post(), calling Invoice.paid() if the invoice is already reconcilied (what Invoice.process do - but we can't just process() directly as it might call post() and entering in end-loop).
- in Invoice.process(), dealing with 'validated' state too, and automatically change the state to 'paid' if the invoice is reconcilied (or ignore it as now).

The first possibility seems more simple to implement. For the second, I am unsure if we can call Invoice.paid() on 'validated' invoice (if the state will effectively do 'validated'->'posted'->'paid' automatically or not)

[1] http://hg.tryton.org/modules/account_invoice/file/tip/account.py#l265
[2] http://hg.tryton.org/modules/account_invoice/file/tip/invoice.py#l1368
History
Date User Action Args
2019-01-17 09:43:15semariesetmessageid: <1547714595.56.0.572038643973.issue7999@tryton.org>
2019-01-17 09:43:15semariesetrecipients: + pokoli
2019-01-17 09:43:15semarielinkissue7999 messages
2019-01-17 09:43:15semariecreate

Showing 10 items. Show all history (warning: this could be VERY long)