| 1 |
<?xml version="1.0" encoding="utf-8"?> |
| 2 |
<odoo> |
| 3 |
<data> |
| 4 |
<record id="view_move_form_inherit_ecpay" model="ir.ui.view"> |
| 5 |
<field name="name">ecpay_invoice_view_form</field> |
| 6 |
<field name="model">account.move</field> |
| 7 |
<field name="inherit_id" ref="account.view_move_form"/> |
| 8 |
<field name="arch" type="xml"> |
| 9 |
<xpath expr="//notebook" position="inside"> |
| 10 |
<page string="Ecpay" invisible="country_code != 'TW' or move_type not in ['out_invoice', 'out_refund']"> |
| 11 |
<group invisible="move_type == 'out_refund'"> |
| 12 |
<group> |
| 13 |
<field name="l10n_tw_edi_state"/> |
| 14 |
<field name="l10n_tw_edi_ecpay_invoice_id"/> |
| 15 |
<field name="l10n_tw_edi_invoice_create_date"/> |
| 16 |
<field name="l10n_tw_edi_invalidate_reason" invisible="l10n_tw_edi_state != 'invalid'"/> |
| 17 |
</group> |
| 18 |
<group> |
| 19 |
<field name="l10n_tw_edi_is_print" readonly="l10n_tw_edi_ecpay_invoice_id" invisible="l10n_tw_edi_is_b2b"/> |
| 20 |
<field name="l10n_tw_edi_love_code" readonly="l10n_tw_edi_ecpay_invoice_id" invisible="l10n_tw_edi_is_print or l10n_tw_edi_is_b2b or l10n_tw_edi_carrier_type"/> |
| 21 |
<field name="l10n_tw_edi_carrier_type" readonly="l10n_tw_edi_ecpay_invoice_id" invisible="l10n_tw_edi_is_print or l10n_tw_edi_is_b2b or l10n_tw_edi_love_code"/> |
| 22 |
<field name="l10n_tw_edi_carrier_number" readonly="l10n_tw_edi_ecpay_invoice_id" invisible="l10n_tw_edi_carrier_type not in ['2', '3', '4', '5'] or l10n_tw_edi_is_print or l10n_tw_edi_is_b2b or l10n_tw_edi_love_code" required="l10n_tw_edi_carrier_type in ['2', '3', '4', '5'] and not l10n_tw_edi_is_print and not l10n_tw_edi_is_b2b"/> |
| 23 |
<field name="l10n_tw_edi_carrier_number_2" readonly="l10n_tw_edi_ecpay_invoice_id" invisible="l10n_tw_edi_carrier_type not in ['4', '5'] or l10n_tw_edi_is_print or l10n_tw_edi_is_b2b or l10n_tw_edi_love_code" required="l10n_tw_edi_carrier_type in ['4', '5'] and not l10n_tw_edi_is_print and not l10n_tw_edi_is_b2b"/> |
| 24 |
<field name="l10n_tw_edi_clearance_mark" readonly="l10n_tw_edi_ecpay_invoice_id" invisible="not l10n_tw_edi_is_zero_tax_rate"/> |
| 25 |
<field name="l10n_tw_edi_zero_tax_rate_reason" readonly="l10n_tw_edi_ecpay_invoice_id" invisible="not l10n_tw_edi_is_zero_tax_rate"/> |
| 26 |
</group> |
| 27 |
</group> |
| 28 |
<group string="ECpay E-invoice Refund" invisible="move_type != 'out_refund'"> |
| 29 |
<group> |
| 30 |
<field name="l10n_tw_edi_refund_invoice_number"/> |
| 31 |
<field name="l10n_tw_edi_refund_state" invisible="l10n_tw_edi_is_b2b"/> |
| 32 |
<field name="l10n_tw_edi_refund_agreement_type" readonly="l10n_tw_edi_refund_invoice_number" invisible="l10n_tw_edi_is_b2b"/> |
| 33 |
<field name="l10n_tw_edi_allowance_notify_way" readonly="l10n_tw_edi_refund_invoice_number" invisible="l10n_tw_edi_is_b2b"/> |
| 34 |
</group> |
| 35 |
<group/> |
| 36 |
</group> |
| 37 |
</page> |
| 38 |
</xpath> |
| 39 |
</field> |
| 40 |
</record> |
| 41 |
|
| 42 |
<record id="action_print_ecpay_invoice" model="ir.actions.server"> |
| 43 |
<field name="name">Print Ecpay invoice</field> |
| 44 |
<field name="model_id" ref="account.model_account_move"/> |
| 45 |
<field name="binding_model_id" ref="account.model_account_move"/> |
| 46 |
<field name="binding_view_types">form</field> |
| 47 |
<field name="state">code</field> |
| 48 |
<field name="code"> |
| 49 |
action = record._l10n_tw_edi_print_invoice() |
| 50 |
</field> |
| 51 |
</record> |
| 52 |
</data> |
| 53 |
</odoo> |