Debian Codegraph @

addons/l10n_hr_edi/views/account_move_views.xml

raw
1 <?xml version="1.0" encoding="utf-8"?>
2 <odoo>
3 <data>
4 <record id="account_move_form_inherit" model="ir.ui.view">
5 <field name="name">account.move.form.inherit</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="//button[@name='button_cancel']" position="before">
10 <button string="MER: Reject eRacun"
11 name="l10n_hr_edi_mer_action_reject"
12 class="oe_highlight"
13 type="object"
14 groups="account.group_account_invoice"
15 invisible="(move_type not in ('in_invoice', 'in_refund') or state != 'draft' or l10n_hr_business_document_status == '1' or l10n_hr_mer_document_eid == False)"
16 />
17 </xpath>
18 <xpath expr="//button[@name='button_cancel']" position="after">
19 <button string="MER: Fetch status"
20 name="l10n_hr_edi_mer_action_fetch_status"
21 class="oe_highlight"
22 type="object"
23 groups="account.group_account_invoice"
24 invisible="not l10n_hr_mer_document_eid"
25 />
26 <button string="MER: Report payments"
27 name="l10n_hr_edi_mer_action_report_paid"
28 class="oe_highlight"
29 type="object"
30 groups="account.group_account_invoice"
31 invisible="not l10n_hr_mer_document_eid or (amount_total - amount_residual) == l10n_hr_payment_reported_amount or move_type not in ('out_invoice', 'out_refund')"
32 />
33 </xpath>
34 <xpath expr="//header" position="after">
35 <div class="alert alert-warning w-100 d-flex align-items-center gap-1" invisible="move_type not in ('in_invoice', 'in_refund') or not l10n_hr_mer_document_eid or l10n_hr_fiscalization_status == '0' or invoice_date &gt;= '2026-01-01 00:00:00'" role="alert">
36 <span>This document is dated before 01.01.2026 and is not fiscalized by MojEracun</span>
37 </div>
38 <div class="alert alert-danger w-100 d-flex align-items-center gap-1" invisible="move_type not in ('in_invoice', 'in_refund') or not l10n_hr_mer_document_eid or l10n_hr_fiscalization_status == '0' or invoice_date &lt; '2026-01-01 00:00:00'" role="alert">
39 <span>This document is not successfully fiscalized by MojEracun</span>
40 </div>
41 <div class="alert alert-warning w-100 d-flex align-items-center gap-1" invisible="not l10n_hr_mer_document_eid or l10n_hr_fiscalization_channel_type != '1'" role="alert">
42 <span>Warning: this document was not successfully delivered to the recepient via EDI and needs to be sent manually (ex. via e-mail)</span>
43 </div>
44 <div class="alert alert-warning w-100 d-flex align-items-center gap-1" invisible="not l10n_hr_mer_document_eid or l10n_hr_payment_reported_amount == (amount_total - amount_residual)" role="alert">
45 <span>Warning: some payments for this document are not reported to the Tax Autority</span>
46 </div>
47 </xpath>
48 <xpath expr="//page[@id='other_tab_entry']" position="after">
49 <page id="l10n_hr_edi_tab"
50 string="Croatia: Fiscalization 2.0"
51 name="page_hr_edi_tab"
52 invisible="country_code != 'HR'">
53 <group string="Accounting information"
54 name="l10n_hr_accounting_info_group">
55 <field name="l10n_hr_invoice_sending_time"
56 invisible="move_type not in ('out_invoice', 'out_refund')"
57 readonly="True"
58 />
59 <field name="l10n_hr_process_type"
60 readonly="state in ['cancel', 'posted']"
61 />
62 <field name="l10n_hr_customer_defined_process_name"
63 invisible="l10n_hr_process_type != 'P99'"
64 readonly="state in ['cancel', 'posted']"
65 />
66 <field name="l10n_hr_fiscal_user_id"
67 invisible="move_type not in ('out_invoice', 'out_refund')"
68 readonly="state in ['cancel', 'posted']"
69 />
70 <field name="l10n_hr_operator_name"
71 invisible="move_type not in ('out_invoice', 'out_refund')"
72 readonly="True"
73 />
74 <field name="l10n_hr_operator_oib"
75 invisible="move_type not in ('out_invoice', 'out_refund')"
76 readonly="True"
77 />
78 </group>
79 <group string="Fiscalization"
80 name="l10n_hr_fiscalization_info_group"
81 invisible="not l10n_hr_edi_addendum_id">
82 <field name="l10n_hr_business_document_status"
83 readonly="True"
84 />
85 <field name="l10n_hr_business_status_reason"
86 invisible="l10n_hr_business_status_reason == 'None'"
87 readonly="True"
88 />
89 <field name="l10n_hr_fiscalization_number"
90 readonly="True"
91 />
92 <field name="l10n_hr_fiscalization_status"
93 readonly="True"
94 />
95 <field name="l10n_hr_fiscalization_error"
96 invisible="l10n_hr_fiscalization_status != '1'"
97 readonly="True"
98 />
99 <field name="l10n_hr_fiscalization_request"
100 invisible="not l10n_hr_fiscalization_request"
101 readonly="True"
102 />
103 <field name="l10n_hr_fiscalization_channel_type"
104 readonly="True"
105 />
106 </group>
107 <group string="Payment reporting"
108 name="l10n_hr_payment_info_group"
109 invisible="not l10n_hr_edi_addendum_id or move_type not in ('out_invoice', 'out_refund')">
110 <field name="l10n_hr_payment_reported_amount"
111 readonly="True"
112 />
113 <field name="l10n_hr_payment_method_type"/>
114 </group>
115 <group string="MojEracun"
116 name="l10n_hr_mojeracun_info_group"
117 invisible="not l10n_hr_mer_document_eid">
118 <field name="l10n_hr_mer_document_eid"
119 readonly="True"
120 />
121 <field name="l10n_hr_mer_document_status"
122 readonly="True"
123 />
124 </group>
125 </page>
126 </xpath>
127 <xpath expr="//field[@name='invoice_line_ids']//list/field[@name='product_id']" position="after">
128 <field name="l10n_hr_kpd_category_id"
129 coloumn_invisible="parent.country_code != 'HR'"
130 options="{'no_create': True, 'readonly': False}"
131 />
132 </xpath>
133 </field>
134 </record>
135
136 <record id="view_invoice_tree_inherit" model="ir.ui.view">
137 <field name="name">account.invoice.list.inherit</field>
138 <field name="model">account.move</field>
139 <field name="inherit_id" ref="account.view_invoice_tree"/>
140 <field name="arch" type="xml">
141 <xpath expr="//button[@name='action_force_register_payment']" position="after">
142 <button string="MER: Report payments"
143 name="l10n_hr_edi_mer_action_report_paid"
144 class="oe_highlight"
145 type="object"
146 groups="account.group_account_invoice"
147 />
148 </xpath>
149 <xpath expr="//field[@name='abnormal_date_warning']" position="after">
150 <field name="l10n_hr_mer_document_eid"
151 string="MojEracun eID"
152 readonly="True"
153 widget="badge"
154 optional="hide"
155 />
156 <field name="l10n_hr_mer_document_status"
157 string="MojEracun Status"
158 readonly="True"
159 widget="badge"
160 decoration-success="l10n_hr_mer_document_status in ['30', '40', '70']"
161 decoration-warning="l10n_hr_mer_document_status == '20'"
162 decoration-danger="l10n_hr_mer_document_status in ['45', '50']"
163 optional="hide"
164 />
165 <field name="l10n_hr_business_document_status"
166 string="Business Document Status"
167 readonly="True"
168 widget="badge"
169 decoration-success="l10n_hr_business_document_status in ['0', '2', '4', '99']"
170 decoration-warning="l10n_hr_business_document_status == '3'"
171 decoration-danger="l10n_hr_business_document_status == '1'"
172 optional="hide"
173 />
174 <field name="l10n_hr_fiscalization_status"
175 string="Fiscalization 2.0 Status"
176 readonly="True"
177 widget="badge"
178 decoration-success="l10n_hr_fiscalization_status == '0'"
179 decoration-warning="l10n_hr_fiscalization_status == '2'"
180 decoration-danger="l10n_hr_fiscalization_status == '1'"
181 optional="hide"
182 />
183 <field name="l10n_hr_payment_reported_amount"
184 string="Reported Paid"
185 readonly="True"
186 decoration-success="l10n_hr_payment_reported_amount == (amount_total - amount_residual) and amount_total != amount_residual"
187 decoration-warning="l10n_hr_payment_reported_amount &lt; (amount_total - amount_residual)"
188 decoration-danger="l10n_hr_payment_reported_amount &gt; (amount_total - amount_residual)"
189 invisible="not l10n_hr_mer_document_eid or state in ('draft', 'cancelled')"
190 optional="hide"
191 />
192 </xpath>
193 </field>
194 </record>
195
196 <record id="view_account_invoice_filter_inherit" model="ir.ui.view">
197 <field name="name">account.invoice.select.inherit</field>
198 <field name="model">account.move</field>
199 <field name="inherit_id" ref="account.view_account_invoice_filter"/>
200 <field name="arch" type="xml">
201 <xpath expr="//search/group" position="before">
202 <filter string="Is a MER document" name="l10n_hr_is_mer" domain="[('l10n_hr_mer_document_eid', '!=', False)]"/>
203 <filter string="Has unreported payments" name="l10n_hr_has_unreported_payments" domain="[('l10n_hr_payment_unreported', '!=', False)]"/>
204 <separator/>
205 </xpath>
206 </field>
207 </record>
208 </data>
209 </odoo>