forked from OCA/account-invoicing
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b48b3a5
commit 32a857b
Showing
12 changed files
with
102 additions
and
219 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink | ||
access_account_invoice_refund_reason,access_account_invoice_refund_reason,model_account_invoice_refund_reason,base.group_user,1,1,1,0 | ||
access_account_invoice_refund_reason_user,access_account_invoice_refund_reason_user,model_account_invoice_refund_reason,account.group_account_invoice,1,0,0,0 | ||
access_account_invoice_refund_reason_manager,access_account_invoice_refund_reason_manager,model_account_invoice_refund_reason,account.group_account_manager,1,1,1,1 |
73 changes: 34 additions & 39 deletions
73
account_invoice_refund_reason/views/account_invoice_refund_reason_view.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,39 @@ | ||
|
||
<odoo> | ||
<data> | ||
|
||
<record id="view_account_invoice_refund_reason" model="ir.ui.view"> | ||
<field name="name">account.invoice.refund.reason.form</field> | ||
<field name="model">account.invoice.refund.reason</field> | ||
<field name="arch" type="xml"> | ||
<form> | ||
<sheet> | ||
<group> | ||
<field name="name"/> | ||
</group> | ||
</sheet> | ||
</form> | ||
</field> | ||
</record> | ||
|
||
<record id="view_account_invoice_refund_reason_tree" model="ir.ui.view"> | ||
<field name="name">account.invoice.refund.reason.tree</field> | ||
<field name="model">account.invoice.refund.reason</field> | ||
<field name="arch" type="xml"> | ||
<tree> | ||
<field name="name"/> | ||
</tree> | ||
</field> | ||
</record> | ||
<record id="view_account_invoice_refund_reason" model="ir.ui.view"> | ||
<field name="name">account.invoice.refund.reason.form</field> | ||
<field name="model">account.invoice.refund.reason</field> | ||
<field name="arch" type="xml"> | ||
<form> | ||
<sheet> | ||
<group> | ||
<field name="name"/> | ||
</group> | ||
</sheet> | ||
</form> | ||
</field> | ||
</record> | ||
|
||
<record id="refund_reason_action" model="ir.actions.act_window"> | ||
<field name="name">Refund Reasons</field> | ||
<field name="res_model">account.invoice.refund.reason</field> | ||
<field name="view_type">form</field> | ||
<field name="view_mode">tree,form</field> | ||
</record> | ||
<record id="view_account_invoice_refund_reason_tree" model="ir.ui.view"> | ||
<field name="name">account.invoice.refund.reason.tree</field> | ||
<field name="model">account.invoice.refund.reason</field> | ||
<field name="arch" type="xml"> | ||
<tree> | ||
<field name="name"/> | ||
</tree> | ||
</field> | ||
</record> | ||
|
||
<menuitem | ||
id="refund_reasons_menu" | ||
name="Refund Reasons" | ||
parent="account.account_management_menu" | ||
action="refund_reason_action" | ||
groups="base.group_user"/> | ||
<record id="refund_reason_action" model="ir.actions.act_window"> | ||
<field name="name">Refund Reasons</field> | ||
<field name="res_model">account.invoice.refund.reason</field> | ||
<field name="view_type">form</field> | ||
<field name="view_mode">tree,form</field> | ||
</record> | ||
|
||
</data> | ||
<menuitem | ||
id="refund_reasons_menu" | ||
name="Refund Reasons" | ||
parent="account.account_management_menu" | ||
action="refund_reason_action" | ||
groups="base.group_user"/> | ||
</odoo> |
57 changes: 26 additions & 31 deletions
57
account_invoice_refund_reason/views/account_invoice_view.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,29 @@ | ||
|
||
<odoo> | ||
<data> | ||
|
||
<record id="extended_view_account_invoice" model="ir.ui.view"> | ||
<field name="name">extended.account.invoice.form</field> | ||
<field name="model">account.invoice</field> | ||
<field name="inherit_id" ref="account.invoice_form"/> | ||
<field name="arch" type="xml"> | ||
<xpath expr="//field[@name='reference']" position="after"> | ||
<field name="reason_id" attrs="{'invisible': [('type','not in', ['in_refund', 'out_refund'])]}" readonly="1"/> | ||
</xpath> | ||
<xpath expr="//page[@name='other_info']/group/group[1]/field[@name='name']" position="attributes"> | ||
<attribute name="attrs">{'invisible': [('type','in', ['in_refund', 'out_refund'])]}</attribute> | ||
</xpath> | ||
</field> | ||
</record> | ||
|
||
<record id="extended_view_account_invoice_supplier_form" model="ir.ui.view"> | ||
<field name="name">extended.account.invoice.supplier.form</field> | ||
<field name="model">account.invoice</field> | ||
<field name="inherit_id" ref="account.invoice_supplier_form"/> | ||
<field name="arch" type="xml"> | ||
<xpath expr="//page[@name='other_info']/group/group[1]/field[@name='name']" position="attributes"> | ||
<attribute name="attrs">{'invisible': [('type','in', ['in_refund', 'out_refund'])]}</attribute> | ||
</xpath> | ||
<xpath expr="//field[@name='date']" position="after"> | ||
<field name="reason_id" attrs="{'invisible': [('type','not in', ['in_refund', 'out_refund'])]}" readonly="1"/> | ||
</xpath> | ||
</field> | ||
</record> | ||
<record id="extended_view_account_invoice" model="ir.ui.view"> | ||
<field name="name">extended.account.invoice.form</field> | ||
<field name="model">account.invoice</field> | ||
<field name="inherit_id" ref="account.invoice_form"/> | ||
<field name="arch" type="xml"> | ||
<xpath expr="//field[@name='reference']" position="after"> | ||
<field name="reason_id" attrs="{'invisible': [('reason_id', '=', False)]}" readonly="1"/> | ||
</xpath> | ||
<xpath expr="//page[@name='other_info']/group/group[1]/field[@name='name']" position="attributes"> | ||
<attribute name="attrs">{'invisible': [('reason_id','!=', False)]}</attribute> | ||
</xpath> | ||
</field> | ||
</record> | ||
|
||
</data> | ||
<record id="extended_view_account_invoice_supplier_form" model="ir.ui.view"> | ||
<field name="name">extended.account.invoice.supplier.form</field> | ||
<field name="model">account.invoice</field> | ||
<field name="inherit_id" ref="account.invoice_supplier_form"/> | ||
<field name="arch" type="xml"> | ||
<xpath expr="//page[@name='other_info']/group/group[1]/field[@name='name']" position="attributes"> | ||
<attribute name="attrs">{'invisible': [('reason_id','!=', False)]}</attribute> | ||
</xpath> | ||
<xpath expr="//field[@name='date']" position="after"> | ||
<field name="reason_id" attrs="{'invisible': [('reason_id', '=', False)]}" readonly="1"/> | ||
</xpath> | ||
</field> | ||
</record> | ||
</odoo> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 14 additions & 19 deletions
33
account_invoice_refund_reason/wizard/account_invoice_refund_view.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,16 @@ | ||
|
||
<odoo> | ||
<data> | ||
|
||
<record id="extended_view_account_invoice_refund" model="ir.ui.view"> | ||
<field name="name">extended.account.invoice.refund.form</field> | ||
<field name="model">account.invoice.refund</field> | ||
<field name="inherit_id" ref="account.view_account_invoice_refund"/> | ||
<field name="arch" type="xml"> | ||
<xpath expr="//field[@name='description']" position="attributes"> | ||
<attribute name="invisible">1</attribute> | ||
<attribute name="required">0</attribute> | ||
</xpath> | ||
<xpath expr="//group[3]" position="inside"> | ||
<field name="reason_id" required="1"/> | ||
</xpath> | ||
</field> | ||
</record> | ||
|
||
</data> | ||
<record id="extended_view_account_invoice_refund" model="ir.ui.view"> | ||
<field name="name">extended.account.invoice.refund.form</field> | ||
<field name="model">account.invoice.refund</field> | ||
<field name="inherit_id" ref="account.view_account_invoice_refund"/> | ||
<field name="arch" type="xml"> | ||
<xpath expr="//field[@name='description']" position="attributes"> | ||
<attribute name="invisible">1</attribute> | ||
<attribute name="required">0</attribute> | ||
</xpath> | ||
<xpath expr="//group[3]" position="inside"> | ||
<field name="reason_id" required="1"/> | ||
</xpath> | ||
</field> | ||
</record> | ||
</odoo> |