summaryrefslogtreecommitdiff
path: root/addons/account_debit_note/views
diff options
context:
space:
mode:
authorstephanchrst <stephanchrst@gmail.com>2022-05-10 21:51:50 +0700
committerstephanchrst <stephanchrst@gmail.com>2022-05-10 21:51:50 +0700
commit3751379f1e9a4c215fb6eb898b4ccc67659b9ace (patch)
treea44932296ef4a9b71d5f010906253d8c53727726 /addons/account_debit_note/views
parent0a15094050bfde69a06d6eff798e9a8ddf2b8c21 (diff)
initial commit 2
Diffstat (limited to 'addons/account_debit_note/views')
-rw-r--r--addons/account_debit_note/views/account_move_view.xml28
1 files changed, 28 insertions, 0 deletions
diff --git a/addons/account_debit_note/views/account_move_view.xml b/addons/account_debit_note/views/account_move_view.xml
new file mode 100644
index 00000000..0a2dc555
--- /dev/null
+++ b/addons/account_debit_note/views/account_move_view.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="utf-8"?>
+<odoo>
+ <record id="view_move_form_debit" model="ir.ui.view">
+ <field name="name">account.move.form.debit</field>
+ <field name="model">account.move</field>
+ <field name="inherit_id" ref="account.view_move_form"/>
+ <field name="arch" type="xml">
+ <button name="action_reverse" position="after">
+ <field name="debit_origin_id" invisible="1"/>
+ <button name="%(action_view_account_move_debit)d" string='Add Debit Note'
+ type='action' groups="account.group_account_invoice"
+ attrs="{'invisible': ['|', '|', ('debit_origin_id', '!=', False),
+ ('move_type', 'not in', ('out_invoice', 'in_invoice', 'out_refund', 'in_refund')), ('state', '!=', 'posted')]}"/>
+ </button>
+ <div class="oe_button_box" position="inside">
+ <button type="object" class="oe_stat_button" name="action_view_debit_notes" icon="fa-plus" attrs="{'invisible': [('debit_note_count', '=', 0)]}">
+ <div class="o_field_widget o_stat_info">
+ <span class="o_stat_value"><field name="debit_note_count"/></span>
+ <span class="o_stat_text">Debit Notes</span>
+ </div>
+ </button>
+ </div>
+ <field name="invoice_origin" position="after">
+ <field name="debit_origin_id" attrs="{'invisible': [('debit_origin_id', '=', False)]}"/>
+ </field>
+ </field>
+ </record>
+</odoo>