Add payable/receivable date on move line group

Same as 7caa97a96b95 but for move line group.
This commit is contained in:
Cédric Krier
2025-03-27 23:53:17 +01:00
parent a276b07362
commit e5c727a12f
4 changed files with 8 additions and 7 deletions
+4 -3
View File
@@ -711,6 +711,10 @@ class Reconciliation(ModelSQL, ModelView):
class MoveLineMixin:
__slots__ = ()
payable_receivable_date = fields.Function(
fields.Date("Payable/Receivable Date"),
'on_change_with_payable_receivable_date')
@classmethod
def get_move_origin(cls):
Move = Pool().get('account.move')
@@ -1077,9 +1081,6 @@ class Line(DescriptionOriginMixin, MoveLineMixin, ModelSQL, ModelView):
}),
'get_delegated_amount')
payable_receivable_date = fields.Function(
fields.Date("Payable/Receivable Date"),
'on_change_with_payable_receivable_date')
payable_receivable_balance = fields.Function(
Monetary(
"Payable/Receivable Balance",
@@ -84,7 +84,7 @@ this repository contains the full copyright notices and license terms. -->
eval="[('company', '=', Eval('company', -1)), ['OR', If(Eval('receivable', True), ('account.type.receivable', '=', True), ('id', '<', 0)), If(Eval('payable', True), ('account.type.payable', '=', True), ('id', '<', 0))], If(Eval('reconciled', False), (), ('reconciled', '=', False))]"
pyson="1"/>
<field name="search_value"></field>
<field name="order" eval="[('maturity_date', 'ASC'), ('date', 'DESC'), ('id', 'DESC')]" pyson="1"/>
<field name="order" eval="[('payable_receivable_date', 'ASC NULLS FIRST'), ('date', 'DESC'), ('id', 'DESC')]" pyson="1"/>
</record>
<record model="ir.action.act_window.view" id="act_move_line_group_payable_receivable_view1">
<field name="sequence" eval="10"/>
@@ -4,8 +4,8 @@ this repository contains the full copyright notices and license terms. -->
<form>
<label name="party"/>
<field name="party"/>
<label name="maturity_date"/>
<field name="maturity_date"/>
<label name="payable_receivable_date"/>
<field name="payable_receivable_date" string="Date"/>
<label name="amount"/>
<field name="amount"/>
@@ -3,7 +3,7 @@
this repository contains the full copyright notices and license terms. -->
<tree>
<field name="company" expand="1" optional="1"/>
<field name="maturity_date"/>
<field name="payable_receivable_date" string="Date"/>
<field name="party"/>
<field name="amount"/>
<field name="payable_receivable_balance" string="Balance"/>