Compare commits

..

2 Commits
17.0 ... 19.0

3 changed files with 4 additions and 5 deletions

View File

@ -1,6 +1,6 @@
{
'name': 'Account Payment: Current Liability Override',
'version': '17.0.1.0.0',
'version': '19.0.1.0.0',
'summary': 'Allow employees to use a Current Liability account (liability_current) as their payable account and process payments correctly.',
'category': 'Accounting/Accounting',
'author': 'Suherdy Yacob',

View File

@ -11,8 +11,8 @@ class AccountMove(models.Model):
if invoice.payment_state == 'paid' and invoice.is_invoice(include_receipts=True):
term_lines = invoice.line_ids.filtered(lambda l: l.display_type == 'payment_term' and l.account_id.account_type == 'liability_current')
if term_lines and invoice.currency_id.is_zero(invoice.amount_residual):
payments = (term_lines.matched_debit_ids.debit_move_id.move_id.payment_id |
term_lines.matched_credit_ids.credit_move_id.move_id.payment_id)
payments = (term_lines.matched_debit_ids.debit_move_id.payment_id |
term_lines.matched_credit_ids.credit_move_id.payment_id)
if any(not p.is_matched for p in payments if p):
invoice.payment_state = invoice._get_invoice_in_payment_state()

View File

@ -7,7 +7,6 @@ class ResPartner(models.Model):
'account.account',
company_dependent=True,
string="Account Payable",
domain="[('account_type', 'in', ('liability_payable', 'liability_current')), ('deprecated', '=', False)]",
domain="[('account_type', 'in', ('liability_payable', 'liability_current')), ('active', '=', True)]",
help="This account will be used instead of the default one as the payable account for the current partner. Extended to allow Current Liabilities.",
required=True
)