Merge PR #1205 into 13.0

Signed-off-by JordiBForgeFlow
This commit is contained in:
OCA-git-bot
2021-07-07 12:58:20 +00:00
6 changed files with 72 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
# Copyright 2021 ForgeFlow S.L. (http://www.forgeflow.com)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Account Move Reversal Choose Method",
"summary": "Let's choose the Credit Method "
"when adding a credit note to a journal entry.",
"version": "13.0.1.0.0",
"category": "Accounting & Finance",
"website": "https://github.com/OCA/account-financial-tools",
"author": "ForgeFlow, Odoo Community Association (OCA)",
"license": "AGPL-3",
"application": False,
"installable": True,
"depends": ["account"],
"data": ["wizard/account_move_reversal_view.xml"],
}

View File

@@ -0,0 +1,2 @@
* ForgeFlow, S.L. (https://www.forgeflow.com)
* Miquel Raïch <miquel.raich@forgeflow.com>

View File

@@ -0,0 +1,2 @@
This module allows you to choose the Credit Method (refund_method) when
adding a credit note to a journal entry.

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

View File

@@ -0,0 +1,51 @@
<?xml version="1.0" encoding="utf-8" ?>
<!-- Copyright 2021 ForgeFlow S.L. (http://www.forgeflow.com)
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -->
<odoo>
<record id="view_account_move_reversal" model="ir.ui.view">
<field name="name">account.move.reversal.form (choose method)</field>
<field name="model">account.move.reversal</field>
<field name="inherit_id" ref="account.view_account_move_reversal" />
<field name="arch" type="xml">
<xpath expr="//field[@name='refund_method']/.." position="attributes">
<attribute name="attrs">{'invisible': False}</attribute>
</xpath>
<field name="refund_method" position="attributes">
<attribute
name="attrs"
>{'readonly': [('residual', '=', 0), ('move_type', 'in', ('out_invoice', 'in_invoice'))]}</attribute>
</field>
<xpath
expr="//field[@name='refund_method']/../../group[2]"
position="after"
>
<group
attrs="{'invisible': [('move_type', 'in', ('out_invoice', 'in_invoice'))]}"
>
<div
attrs="{'invisible':[('refund_method', '!=', 'refund')]}"
class="oe_grey"
colspan="4"
>
The credit note is created in draft and can be edited before being issued.
</div>
<div
attrs="{'invisible':[('refund_method', '!=', 'cancel')]}"
class="oe_grey"
colspan="4"
>
The credit note is auto-validated and reconciled with the journal entry.
</div>
<div
attrs="{'invisible':[('refund_method', '!=', 'modify')]}"
class="oe_grey"
colspan="4"
>
The credit note is auto-validated and reconciled with the journal entry.
The original journal entry is duplicated as a new draft.
</div>
</group>
</xpath>
</field>
</record>
</odoo>