feat: Upgrade module to Odoo 19, updating view definitions from tree to list and refining account domains.
This commit is contained in:
parent
9d0e51391c
commit
43b6ab10db
0
.gitignore
vendored
Normal file → Executable file
0
.gitignore
vendored
Normal file → Executable file
0
AMOUNT_FIX_GUIDE.md
Normal file → Executable file
0
AMOUNT_FIX_GUIDE.md
Normal file → Executable file
0
CHANGELOG.md
Normal file → Executable file
0
CHANGELOG.md
Normal file → Executable file
0
__init__.py
Normal file → Executable file
0
__init__.py
Normal file → Executable file
2
__manifest__.py
Normal file → Executable file
2
__manifest__.py
Normal file → Executable file
@ -1,7 +1,7 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
{
|
{
|
||||||
'name': 'Vendor Payment Diff Amount',
|
'name': 'Vendor Payment Diff Amount',
|
||||||
'version': '17.0.2.1.0',
|
'version': '19.0.2.1.0',
|
||||||
'category': 'Accounting/Accounting',
|
'category': 'Accounting/Accounting',
|
||||||
'summary': 'Support multiple payment deductions for vendor payments (withholding tax, fees, etc.)',
|
'summary': 'Support multiple payment deductions for vendor payments (withholding tax, fees, etc.)',
|
||||||
'description': """
|
'description': """
|
||||||
|
|||||||
0
fix_amount_issue.py
Normal file → Executable file
0
fix_amount_issue.py
Normal file → Executable file
0
models/__init__.py
Normal file → Executable file
0
models/__init__.py
Normal file → Executable file
0
models/account_batch_payment.py
Normal file → Executable file
0
models/account_batch_payment.py
Normal file → Executable file
0
models/account_payment.py
Normal file → Executable file
0
models/account_payment.py
Normal file → Executable file
2
models/payment_deduction_line.py
Normal file → Executable file
2
models/payment_deduction_line.py
Normal file → Executable file
@ -58,7 +58,7 @@ class PaymentDeductionLine(models.Model):
|
|||||||
'account.account',
|
'account.account',
|
||||||
string='Deduction Account',
|
string='Deduction Account',
|
||||||
required=True,
|
required=True,
|
||||||
domain="[('account_type', 'not in', ['asset_cash', 'asset_cash_bank', 'asset_receivable', 'liability_payable']), ('deprecated', '=', False)]",
|
domain="[('account_type', 'not in', ['asset_cash', 'asset_cash_bank', 'asset_receivable', 'liability_payable'])]",
|
||||||
help='Account where the deduction will be recorded (use tax payable or expense accounts, NOT payable/receivable accounts)',
|
help='Account where the deduction will be recorded (use tax payable or expense accounts, NOT payable/receivable accounts)',
|
||||||
)
|
)
|
||||||
name = fields.Char(
|
name = fields.Char(
|
||||||
|
|||||||
0
security/ir.model.access.csv
Normal file → Executable file
0
security/ir.model.access.csv
Normal file → Executable file
0
tests/__init__.py
Normal file → Executable file
0
tests/__init__.py
Normal file → Executable file
0
tests/test_account_payment.py
Normal file → Executable file
0
tests/test_account_payment.py
Normal file → Executable file
0
tests/test_batch_payment_integration.py
Normal file → Executable file
0
tests/test_batch_payment_integration.py
Normal file → Executable file
12
views/account_batch_payment_views.xml
Normal file → Executable file
12
views/account_batch_payment_views.xml
Normal file → Executable file
@ -1,15 +1,15 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<odoo>
|
<odoo>
|
||||||
<!-- Add deduction lines field to batch payment line tree view -->
|
<!-- Add deduction lines field to batch payment line list view -->
|
||||||
<record id="view_batch_payment_form_inherit_diff_amount" model="ir.ui.view">
|
<record id="view_batch_payment_form_inherit_diff_amount" model="ir.ui.view">
|
||||||
<field name="name">account.batch.payment.form.inherit.diff.amount</field>
|
<field name="name">account.batch.payment.form.inherit.diff.amount</field>
|
||||||
<field name="model">account.batch.payment</field>
|
<field name="model">account.batch.payment</field>
|
||||||
<field name="inherit_id" ref="vendor_batch_payment_merge.view_batch_payment_form_inherit"/>
|
<field name="inherit_id" ref="vendor_batch_payment_merge.view_batch_payment_form_inherit"/>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<!-- Replace the tree view with one that includes a form view for deduction lines -->
|
<!-- Replace the list view with one that includes a form view for deduction lines -->
|
||||||
<xpath expr="//field[@name='direct_payment_line_ids']" position="replace">
|
<xpath expr="//field[@name='direct_payment_line_ids']" position="replace">
|
||||||
<field name="direct_payment_line_ids">
|
<field name="direct_payment_line_ids">
|
||||||
<tree editable="bottom">
|
<list editable="bottom">
|
||||||
<field name="partner_id" domain="parent.batch_type == 'outbound' and [('supplier_rank', '>', 0)] or [('customer_rank', '>', 0)]" options="{'no_create': True}"/>
|
<field name="partner_id" domain="parent.batch_type == 'outbound' and [('supplier_rank', '>', 0)] or [('customer_rank', '>', 0)]" options="{'no_create': True}"/>
|
||||||
<field name="amount" sum="Total"/>
|
<field name="amount" sum="Total"/>
|
||||||
<field name="expense_account_id"/>
|
<field name="expense_account_id"/>
|
||||||
@ -17,7 +17,7 @@
|
|||||||
<field name="memo"/>
|
<field name="memo"/>
|
||||||
<field name="date"/>
|
<field name="date"/>
|
||||||
<field name="payment_id" readonly="1"/>
|
<field name="payment_id" readonly="1"/>
|
||||||
</tree>
|
</list>
|
||||||
<form>
|
<form>
|
||||||
<group>
|
<group>
|
||||||
<group name="payment_info">
|
<group name="payment_info">
|
||||||
@ -32,13 +32,13 @@
|
|||||||
</group>
|
</group>
|
||||||
<group string="Deductions" name="deductions">
|
<group string="Deductions" name="deductions">
|
||||||
<field name="deduction_line_ids" nolabel="1" context="{'default_currency_id': currency_id}">
|
<field name="deduction_line_ids" nolabel="1" context="{'default_currency_id': currency_id}">
|
||||||
<tree editable="bottom">
|
<list editable="bottom">
|
||||||
<field name="sequence" widget="handle"/>
|
<field name="sequence" widget="handle"/>
|
||||||
<field name="substract_account_id" required="1"/>
|
<field name="substract_account_id" required="1"/>
|
||||||
<field name="name" placeholder="Description (optional)"/>
|
<field name="name" placeholder="Description (optional)"/>
|
||||||
<field name="amount_substract" required="1" sum="Total"/>
|
<field name="amount_substract" required="1" sum="Total"/>
|
||||||
<field name="currency_id" column_invisible="1"/>
|
<field name="currency_id" column_invisible="1"/>
|
||||||
</tree>
|
</list>
|
||||||
</field>
|
</field>
|
||||||
<field name="amount_substract" readonly="1"/>
|
<field name="amount_substract" readonly="1"/>
|
||||||
</group>
|
</group>
|
||||||
|
|||||||
4
views/account_payment_views.xml
Normal file → Executable file
4
views/account_payment_views.xml
Normal file → Executable file
@ -12,14 +12,14 @@
|
|||||||
invisible="payment_type != 'outbound'"
|
invisible="payment_type != 'outbound'"
|
||||||
readonly="state != 'draft'"
|
readonly="state != 'draft'"
|
||||||
nolabel="1">
|
nolabel="1">
|
||||||
<tree editable="bottom">
|
<list editable="bottom">
|
||||||
<field name="sequence" widget="handle"/>
|
<field name="sequence" widget="handle"/>
|
||||||
<field name="substract_account_id" required="1"/>
|
<field name="substract_account_id" required="1"/>
|
||||||
<field name="name" placeholder="Description (optional)"/>
|
<field name="name" placeholder="Description (optional)"/>
|
||||||
<field name="amount_substract" required="1" sum="Total Deductions"/>
|
<field name="amount_substract" required="1" sum="Total Deductions"/>
|
||||||
<field name="currency_id" column_invisible="1"/>
|
<field name="currency_id" column_invisible="1"/>
|
||||||
<field name="company_id" column_invisible="1"/>
|
<field name="company_id" column_invisible="1"/>
|
||||||
</tree>
|
</list>
|
||||||
</field>
|
</field>
|
||||||
|
|
||||||
<label for="amount_substract" string="Total Deductions"
|
<label for="amount_substract" string="Total Deductions"
|
||||||
|
|||||||
0
wizard/__init__.py
Normal file → Executable file
0
wizard/__init__.py
Normal file → Executable file
0
wizard/payment_amount_fix_wizard.py
Normal file → Executable file
0
wizard/payment_amount_fix_wizard.py
Normal file → Executable file
4
wizard/payment_amount_fix_wizard_views.xml
Normal file → Executable file
4
wizard/payment_amount_fix_wizard_views.xml
Normal file → Executable file
@ -12,14 +12,14 @@
|
|||||||
</p>
|
</p>
|
||||||
<group>
|
<group>
|
||||||
<field name="payment_ids" nolabel="1">
|
<field name="payment_ids" nolabel="1">
|
||||||
<tree>
|
<list>
|
||||||
<field name="name"/>
|
<field name="name"/>
|
||||||
<field name="partner_id"/>
|
<field name="partner_id"/>
|
||||||
<field name="amount"/>
|
<field name="amount"/>
|
||||||
<field name="amount_substract"/>
|
<field name="amount_substract"/>
|
||||||
<field name="final_payment_amount"/>
|
<field name="final_payment_amount"/>
|
||||||
<field name="date"/>
|
<field name="date"/>
|
||||||
</tree>
|
</list>
|
||||||
</field>
|
</field>
|
||||||
</group>
|
</group>
|
||||||
<footer>
|
<footer>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user