Skip to content

Commit

Permalink
[11.0][IMP] Remove useless button on invoice
Browse files Browse the repository at this point in the history
Remove the button "Print ISR" on invoices to avoid confusion with Odoo base
implementation and rename the one from this module for user consistency
  • Loading branch information
p-tombez authored and grindtildeath committed Aug 23, 2018
1 parent 0f48cf7 commit a56e552
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 14 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ Multiple payment terms on invoices are supported.

It will also allow you to do the import of V11 bank statement files and do an automatic reconciliation.

(replaces core l10n_ch module for ISR)


l10n_ch_base_bank
-----------------
Expand Down
2 changes: 1 addition & 1 deletion l10n_ch_payment_slip/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{'name': 'Switzerland - ISR inpayment slip (PVR/BVR/ESR)',
'summary': 'Print inpayment slip from your invoices',
'version': '11.0.1.0.0',
'version': '10.0.1.1.1',
'author': "Camptocamp,Odoo Community Association (OCA)",
'category': 'Localization',
'website': 'http://www.camptocamp.com',
Expand Down
29 changes: 16 additions & 13 deletions l10n_ch_payment_slip/views/account_invoice.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,33 +8,36 @@
<field name="domain">[('invoice_id', '=', active_id)]</field>
</record>

<record model="ir.ui.view" id="invoice_form_add_isr_ref">
<record model="ir.ui.view" id="invoice_form_add_isr_ref">
<field name="name">account.invoice.form.isr.ref</field>
<field name="model">account.invoice</field>
<field name="type">form</field>
<field name="inherit_id" ref="account.invoice_form"/>
<field name="arch" type="xml">
<xpath expr="//button[@name='invoice_print'][1]" position="after">
<button type="object"
string="ISR"
name="print_isr"
attrs="{'invisible': ['|',('sent','=',True), ('state', '!=', 'open')]}"
class="oe_highlight"/>
string="Print CH ISR"
name="print_isr"
attrs="{'invisible': ['|',('sent','=',True), ('state', '!=', 'open')]}"
class="oe_highlight"/>
</xpath>
<xpath expr="//button[@name='invoice_print'][2]" position="after">
<button type="object"
string="ISR"
name="print_isr"
attrs="{'invisible':['|',('sent','=',False), ('state', '!=', 'open')]}"/>
string="Print CH ISR"
name="print_isr"
attrs="{'invisible':['|',('sent','=',False), ('state', '!=', 'open')]}"/>
</xpath>
<xpath expr="//button[@name='isr_print']" position="attributes">
<attribute name="invisible">1</attribute>
</xpath>
<field name="tax_line_ids" position="before">
<group colspan="4">
<field name="isr_reference" colspan="4"/>
<button type="action"
string="Open Payment Slips"
groups="base.group_system"
name="%(l10n_ch_payment_slip.action_slip_all)d"
attrs="{'invisible': ['|', ('type', '!=', 'out_invoice'), ('isr_reference', '=', False)]}"/>
string="Open Payment Slips"
groups="base.group_system"
name="%(l10n_ch_payment_slip.action_slip_all)d"
attrs="{'invisible': ['|', ('type', '!=', 'out_invoice'), ('isr_reference', '=', False)]}"/>
</group>
</field>
</field>
Expand Down Expand Up @@ -62,7 +65,7 @@
<field name="model">l10n_ch.payment_slip</field>
<field name="arch" type="xml">
<tree string="Payment Slip">
<field name="reference"/>
<field name="reference"/>
</tree>
</field>
</record>
Expand Down

0 comments on commit a56e552

Please sign in to comment.