Ask for the clearing date when the payment group succeeds
Closes #14075
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
* Ask for the clearing date when the payment group succeeds
|
||||
|
||||
Version 7.6.0 - 2025-04-28
|
||||
--------------------------
|
||||
|
||||
@@ -30,6 +30,9 @@ Succeed Payment
|
||||
The *Succeed Payment* wizard asks for the date to use for the clearing `Account
|
||||
Move <account:model-account.move>` before succeeding the payment.
|
||||
|
||||
.. note:: The wizard is also used to succeed `Payment Group
|
||||
<account_payment:model-account.payment.group>`.
|
||||
|
||||
.. _model-account.payment.journal:
|
||||
|
||||
Payment Journal
|
||||
|
||||
@@ -391,6 +391,13 @@ class Group(metaclass=PoolMeta):
|
||||
help="All payments in the group are reconciled."),
|
||||
'get_reconciled', searcher='search_reconciled')
|
||||
|
||||
@classmethod
|
||||
def __setup__(cls):
|
||||
super().__setup__()
|
||||
cls._buttons.update({
|
||||
'succeed_wizard': cls._buttons['succeed'],
|
||||
})
|
||||
|
||||
@classmethod
|
||||
def get_reconciled(cls, groups, name):
|
||||
pool = Pool()
|
||||
@@ -432,6 +439,12 @@ class Group(metaclass=PoolMeta):
|
||||
group_by=payment.group)
|
||||
return [('id', 'in', query)]
|
||||
|
||||
@classmethod
|
||||
@ModelView.button_action(
|
||||
'account_payment_clearing.wizard_payment_group_succeed')
|
||||
def succeed_wizard(cls, groups):
|
||||
pass
|
||||
|
||||
@classmethod
|
||||
def reconcile_clearing(cls, groups):
|
||||
pool = Pool()
|
||||
|
||||
@@ -22,12 +22,30 @@ this repository contains the full copyright notices and license terms. -->
|
||||
<field name="name">payment_list</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="payment_group_view_form">
|
||||
<field name="model">account.payment.group</field>
|
||||
<field name="inherit" ref="account_payment.payment_group_view_form"/>
|
||||
<field name="name">payment_group_form</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="payment_group_view_list">
|
||||
<field name="model">account.payment.group</field>
|
||||
<field name="inherit" ref="account_payment.payment_group_view_list"/>
|
||||
<field name="name">payment_group_list</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.model.button" id="payment_group_succeed_wizard_button">
|
||||
<field name="model">account.payment.group</field>
|
||||
<field name="name">succeed_wizard</field>
|
||||
<field name="string">Succeed</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.action.wizard" id="wizard_payment_group_succeed">
|
||||
<field name="name">Succeed Groups</field>
|
||||
<field name="wiz_name">account.payment.succeed</field>
|
||||
<field name="model">account.payment.group</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.action.wizard" id="wizard_succeed">
|
||||
<field name="name">Succeed Payments</field>
|
||||
<field name="wiz_name">account.payment.succeed</field>
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0"?>
|
||||
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
|
||||
this repository contains the full copyright notices and license terms. -->
|
||||
<data>
|
||||
<xpath expr="//button[@name='succeed']" position="replace_attributes">
|
||||
<button name="succeed_wizard"/>
|
||||
</xpath>
|
||||
</data>
|
||||
Reference in New Issue
Block a user