odoo-addon-l10n-br-fiscal 18.0.2.1.0__py3-none-any.whl → 18.0.3.1.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of odoo-addon-l10n-br-fiscal might be problematic. Click here for more details.
- odoo/addons/l10n_br_fiscal/README.rst +1 -1
- odoo/addons/l10n_br_fiscal/__manifest__.py +1 -1
- odoo/addons/l10n_br_fiscal/demo/fiscal_document_demo.xml +2 -90
- odoo/addons/l10n_br_fiscal/demo/fiscal_document_nfse_demo.xml +0 -4
- odoo/addons/l10n_br_fiscal/demo/fiscal_operation_demo.xml +2 -2
- odoo/addons/l10n_br_fiscal/i18n/l10n_br_fiscal.pot +24 -24
- odoo/addons/l10n_br_fiscal/migrations/18.0.3.0.0/pre-migration.py +30 -0
- odoo/addons/l10n_br_fiscal/models/document.py +1 -6
- odoo/addons/l10n_br_fiscal/models/document_line.py +35 -5
- odoo/addons/l10n_br_fiscal/models/document_line_mixin.py +63 -12
- odoo/addons/l10n_br_fiscal/models/document_line_mixin_methods.py +74 -52
- odoo/addons/l10n_br_fiscal/models/document_mixin.py +3 -3
- odoo/addons/l10n_br_fiscal/models/document_mixin_methods.py +28 -142
- odoo/addons/l10n_br_fiscal/models/document_related.py +1 -1
- odoo/addons/l10n_br_fiscal/static/description/index.html +1 -1
- odoo/addons/l10n_br_fiscal/tests/test_document_edition.py +113 -0
- odoo/addons/l10n_br_fiscal/tests/test_fiscal_document_generic.py +0 -11
- odoo/addons/l10n_br_fiscal/tests/test_fiscal_document_nfse.py +0 -1
- odoo/addons/l10n_br_fiscal/tests/test_tax_benefit.py +0 -1
- odoo/addons/l10n_br_fiscal/views/document_line_view.xml +3 -3
- odoo/addons/l10n_br_fiscal/views/document_view.xml +6 -6
- {odoo_addon_l10n_br_fiscal-18.0.2.1.0.dist-info → odoo_addon_l10n_br_fiscal-18.0.3.1.0.dist-info}/METADATA +2 -2
- {odoo_addon_l10n_br_fiscal-18.0.2.1.0.dist-info → odoo_addon_l10n_br_fiscal-18.0.3.1.0.dist-info}/RECORD +25 -24
- {odoo_addon_l10n_br_fiscal-18.0.2.1.0.dist-info → odoo_addon_l10n_br_fiscal-18.0.3.1.0.dist-info}/WHEEL +0 -0
- {odoo_addon_l10n_br_fiscal-18.0.2.1.0.dist-info → odoo_addon_l10n_br_fiscal-18.0.3.1.0.dist-info}/top_level.txt +0 -0
|
@@ -11,7 +11,7 @@ Módulo fiscal brasileiro
|
|
|
11
11
|
!! This file is generated by oca-gen-addon-readme !!
|
|
12
12
|
!! changes will be overwritten. !!
|
|
13
13
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
14
|
-
!! source digest: sha256:
|
|
14
|
+
!! source digest: sha256:306bfd80e3ccb9e7d199cfffc21bda642881eece97f1763ad8f6009904d198f4
|
|
15
15
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
16
16
|
|
|
17
17
|
.. |badge1| image:: https://img.shields.io/badge/maturity-Production%2FStable-green.png
|
|
@@ -35,10 +35,6 @@
|
|
|
35
35
|
<field name="fiscal_operation_line_id" ref="l10n_br_fiscal.fo_venda_venda" />
|
|
36
36
|
</record>
|
|
37
37
|
|
|
38
|
-
<function model="l10n_br_fiscal.document.line" name="_onchange_product_id_fiscal">
|
|
39
|
-
<value eval="[ref('demo_nfe_line_same_state_1-1')]" />
|
|
40
|
-
</function>
|
|
41
|
-
|
|
42
38
|
<record id="demo_nfe_line_same_state_1-1" model="l10n_br_fiscal.document.line" />
|
|
43
39
|
|
|
44
40
|
<function model="l10n_br_fiscal.document.line" name="_onchange_fiscal_operation_id">
|
|
@@ -56,10 +52,6 @@
|
|
|
56
52
|
<field name="fiscal_operation_line_id" ref="l10n_br_fiscal.fo_venda_venda" />
|
|
57
53
|
</record>
|
|
58
54
|
|
|
59
|
-
<function model="l10n_br_fiscal.document.line" name="_onchange_product_id_fiscal">
|
|
60
|
-
<value eval="[ref('demo_nfe_line_same_state_1-2')]" />
|
|
61
|
-
</function>
|
|
62
|
-
|
|
63
55
|
<record id="demo_nfe_line_same_state_1-2" model="l10n_br_fiscal.document.line" />
|
|
64
56
|
|
|
65
57
|
<function model="l10n_br_fiscal.document.line" name="_onchange_fiscal_operation_id">
|
|
@@ -92,10 +84,6 @@
|
|
|
92
84
|
<field name="fiscal_operation_line_id" ref="l10n_br_fiscal.fo_venda_venda" />
|
|
93
85
|
</record>
|
|
94
86
|
|
|
95
|
-
<function model="l10n_br_fiscal.document.line" name="_onchange_product_id_fiscal">
|
|
96
|
-
<value eval="[ref('demo_nfe_line_other_state_1-3')]" />
|
|
97
|
-
</function>
|
|
98
|
-
|
|
99
87
|
<record id="demo_nfe_line_other_state_1-3" model="l10n_br_fiscal.document.line" />
|
|
100
88
|
|
|
101
89
|
<function model="l10n_br_fiscal.document.line" name="_onchange_fiscal_operation_id">
|
|
@@ -113,10 +101,6 @@
|
|
|
113
101
|
<field name="fiscal_operation_line_id" ref="l10n_br_fiscal.fo_venda_venda" />
|
|
114
102
|
</record>
|
|
115
103
|
|
|
116
|
-
<function model="l10n_br_fiscal.document.line" name="_onchange_product_id_fiscal">
|
|
117
|
-
<value eval="[ref('demo_nfe_line_other_state_2-3')]" />
|
|
118
|
-
</function>
|
|
119
|
-
|
|
120
104
|
<record id="demo_nfe_line_other_state_2-3" model="l10n_br_fiscal.document.line" />
|
|
121
105
|
|
|
122
106
|
<function model="l10n_br_fiscal.document.line" name="_onchange_fiscal_operation_id">
|
|
@@ -135,10 +119,6 @@
|
|
|
135
119
|
<field name="fiscal_operation_line_id" ref="l10n_br_fiscal.fo_venda_venda" />
|
|
136
120
|
</record>
|
|
137
121
|
|
|
138
|
-
<function model="l10n_br_fiscal.document.line" name="_onchange_product_id_fiscal">
|
|
139
|
-
<value eval="[ref('demo_nfe_line_other_state_3-3')]" />
|
|
140
|
-
</function>
|
|
141
|
-
|
|
142
122
|
<record id="demo_nfe_line_other_state_3-3" model="l10n_br_fiscal.document.line" />
|
|
143
123
|
|
|
144
124
|
<function model="l10n_br_fiscal.document.line" name="_onchange_fiscal_operation_id">
|
|
@@ -173,10 +153,6 @@
|
|
|
173
153
|
<field name="fiscal_operation_line_id" ref="l10n_br_fiscal.fo_venda_venda" />
|
|
174
154
|
</record>
|
|
175
155
|
|
|
176
|
-
<function model="l10n_br_fiscal.document.line" name="_onchange_product_id_fiscal">
|
|
177
|
-
<value eval="[ref('demo_nfe_line_export_3-1')]" />
|
|
178
|
-
</function>
|
|
179
|
-
|
|
180
156
|
<record id="demo_nfe_line_export_3-1" model="l10n_br_fiscal.document.line" />
|
|
181
157
|
|
|
182
158
|
<function model="l10n_br_fiscal.document.line" name="_onchange_fiscal_operation_id">
|
|
@@ -194,10 +170,6 @@
|
|
|
194
170
|
<field name="fiscal_operation_line_id" ref="l10n_br_fiscal.fo_venda_venda" />
|
|
195
171
|
</record>
|
|
196
172
|
|
|
197
|
-
<function model="l10n_br_fiscal.document.line" name="_onchange_product_id_fiscal">
|
|
198
|
-
<value eval="[ref('demo_nfe_line_export_3-2')]" />
|
|
199
|
-
</function>
|
|
200
|
-
|
|
201
173
|
<record id="demo_nfe_line_export_3-2" model="l10n_br_fiscal.document.line" />
|
|
202
174
|
|
|
203
175
|
<function model="l10n_br_fiscal.document.line" name="_onchange_fiscal_operation_id">
|
|
@@ -236,15 +208,11 @@
|
|
|
236
208
|
/>
|
|
237
209
|
<field
|
|
238
210
|
name="comment_ids"
|
|
239
|
-
eval="[(
|
|
211
|
+
eval="[Command.set([ref('l10n_br_fiscal.fiscal_line_comment_dummy')])]"
|
|
240
212
|
/>
|
|
241
213
|
<field name="manual_additional_data">manual comment test</field>
|
|
242
214
|
</record>
|
|
243
215
|
|
|
244
|
-
<function model="l10n_br_fiscal.document.line" name="_onchange_product_id_fiscal">
|
|
245
|
-
<value eval="[ref('demo_nfe_line_nao_contribuinte_4-1')]" />
|
|
246
|
-
</function>
|
|
247
|
-
|
|
248
216
|
<record
|
|
249
217
|
id="demo_nfe_line_nao_contribuinte_4-1"
|
|
250
218
|
model="l10n_br_fiscal.document.line"
|
|
@@ -271,10 +239,6 @@
|
|
|
271
239
|
/>
|
|
272
240
|
</record>
|
|
273
241
|
|
|
274
|
-
<function model="l10n_br_fiscal.document.line" name="_onchange_product_id_fiscal">
|
|
275
|
-
<value eval="[ref('demo_nfe_line_nao_contribuinte_4-2')]" />
|
|
276
|
-
</function>
|
|
277
|
-
|
|
278
242
|
<record
|
|
279
243
|
id="demo_nfe_line_nao_contribuinte_4-2"
|
|
280
244
|
model="l10n_br_fiscal.document.line"
|
|
@@ -313,15 +277,11 @@
|
|
|
313
277
|
/>
|
|
314
278
|
<field
|
|
315
279
|
name="comment_ids"
|
|
316
|
-
eval="[(
|
|
280
|
+
eval="[Command.set([ref('l10n_br_fiscal.fiscal_line_comment_dummy')])]"
|
|
317
281
|
/>
|
|
318
282
|
<field name="manual_additional_data">manual comment test</field>
|
|
319
283
|
</record>
|
|
320
284
|
|
|
321
|
-
<function model="l10n_br_fiscal.document.line" name="_onchange_product_id_fiscal">
|
|
322
|
-
<value eval="[ref('demo_nfe_tax_benefit_4-1')]" />
|
|
323
|
-
</function>
|
|
324
|
-
|
|
325
285
|
<record id="demo_nfe_tax_benefit_4-1" model="l10n_br_fiscal.document.line" />
|
|
326
286
|
|
|
327
287
|
<function model="l10n_br_fiscal.document.line" name="_onchange_fiscal_operation_id">
|
|
@@ -357,10 +317,6 @@
|
|
|
357
317
|
/>
|
|
358
318
|
</record>
|
|
359
319
|
|
|
360
|
-
<function model="l10n_br_fiscal.document.line" name="_onchange_product_id_fiscal">
|
|
361
|
-
<value eval="[ref('demo_nfe_nao_contribuinte_pf_1-2')]" />
|
|
362
|
-
</function>
|
|
363
|
-
|
|
364
320
|
<record
|
|
365
321
|
id="demo_nfe_nao_contribuinte_pf_1-2"
|
|
366
322
|
model="l10n_br_fiscal.document.line"
|
|
@@ -384,10 +340,6 @@
|
|
|
384
340
|
/>
|
|
385
341
|
</record>
|
|
386
342
|
|
|
387
|
-
<function model="l10n_br_fiscal.document.line" name="_onchange_product_id_fiscal">
|
|
388
|
-
<value eval="[ref('demo_nfe_nao_contribuinte_pf_2-2')]" />
|
|
389
|
-
</function>
|
|
390
|
-
|
|
391
343
|
<record
|
|
392
344
|
id="demo_nfe_nao_contribuinte_pf_2-2"
|
|
393
345
|
model="l10n_br_fiscal.document.line"
|
|
@@ -423,10 +375,6 @@
|
|
|
423
375
|
<field name="fiscal_operation_line_id" ref="l10n_br_fiscal.fo_venda_venda" />
|
|
424
376
|
</record>
|
|
425
377
|
|
|
426
|
-
<function model="l10n_br_fiscal.document.line" name="_onchange_product_id_fiscal">
|
|
427
|
-
<value eval="[ref('demo_nfe_line_sn_same_state_5-1')]" />
|
|
428
|
-
</function>
|
|
429
|
-
|
|
430
378
|
<record id="demo_nfe_line_sn_same_state_5-1" model="l10n_br_fiscal.document.line" />
|
|
431
379
|
|
|
432
380
|
<function model="l10n_br_fiscal.document.line" name="_onchange_fiscal_operation_id">
|
|
@@ -444,10 +392,6 @@
|
|
|
444
392
|
<field name="fiscal_operation_line_id" ref="l10n_br_fiscal.fo_venda_venda" />
|
|
445
393
|
</record>
|
|
446
394
|
|
|
447
|
-
<function model="l10n_br_fiscal.document.line" name="_onchange_product_id_fiscal">
|
|
448
|
-
<value eval="[ref('demo_nfe_line_sn_same_state_5-2')]" />
|
|
449
|
-
</function>
|
|
450
|
-
|
|
451
395
|
<record id="demo_nfe_line_sn_same_state_5-2" model="l10n_br_fiscal.document.line" />
|
|
452
396
|
|
|
453
397
|
<function model="l10n_br_fiscal.document.line" name="_onchange_fiscal_operation_id">
|
|
@@ -480,10 +424,6 @@
|
|
|
480
424
|
<field name="fiscal_operation_line_id" ref="l10n_br_fiscal.fo_venda_venda" />
|
|
481
425
|
</record>
|
|
482
426
|
|
|
483
|
-
<function model="l10n_br_fiscal.document.line" name="_onchange_product_id_fiscal">
|
|
484
|
-
<value eval="[ref('demo_nfe_line_sn_other_state_6-1')]" />
|
|
485
|
-
</function>
|
|
486
|
-
|
|
487
427
|
<record
|
|
488
428
|
id="demo_nfe_line_sn_other_state_6-1"
|
|
489
429
|
model="l10n_br_fiscal.document.line"
|
|
@@ -504,10 +444,6 @@
|
|
|
504
444
|
<field name="fiscal_operation_line_id" ref="l10n_br_fiscal.fo_venda_venda" />
|
|
505
445
|
</record>
|
|
506
446
|
|
|
507
|
-
<function model="l10n_br_fiscal.document.line" name="_onchange_product_id_fiscal">
|
|
508
|
-
<value eval="[ref('demo_nfe_line_sn_other_state_6-2')]" />
|
|
509
|
-
</function>
|
|
510
|
-
|
|
511
447
|
<record
|
|
512
448
|
id="demo_nfe_line_sn_other_state_6-2"
|
|
513
449
|
model="l10n_br_fiscal.document.line"
|
|
@@ -543,10 +479,6 @@
|
|
|
543
479
|
<field name="fiscal_operation_line_id" ref="l10n_br_fiscal.fo_venda_venda" />
|
|
544
480
|
</record>
|
|
545
481
|
|
|
546
|
-
<function model="l10n_br_fiscal.document.line" name="_onchange_product_id_fiscal">
|
|
547
|
-
<value eval="[ref('demo_nfe_line_sn_export_7-1')]" />
|
|
548
|
-
</function>
|
|
549
|
-
|
|
550
482
|
<record id="demo_nfe_line_sn_export_7-1" model="l10n_br_fiscal.document.line" />
|
|
551
483
|
|
|
552
484
|
<function model="l10n_br_fiscal.document.line" name="_onchange_fiscal_operation_id">
|
|
@@ -564,10 +496,6 @@
|
|
|
564
496
|
<field name="fiscal_operation_line_id" ref="l10n_br_fiscal.fo_venda_venda" />
|
|
565
497
|
</record>
|
|
566
498
|
|
|
567
|
-
<function model="l10n_br_fiscal.document.line" name="_onchange_product_id_fiscal">
|
|
568
|
-
<value eval="[ref('demo_nfe_line_sn_export_7-2')]" />
|
|
569
|
-
</function>
|
|
570
|
-
|
|
571
499
|
<record id="demo_nfe_line_sn_export_7-2" model="l10n_br_fiscal.document.line" />
|
|
572
500
|
|
|
573
501
|
<function model="l10n_br_fiscal.document.line" name="_onchange_fiscal_operation_id">
|
|
@@ -603,10 +531,6 @@
|
|
|
603
531
|
<field name="fiscal_operation_line_id" ref="l10n_br_fiscal.fo_venda_venda" />
|
|
604
532
|
</record>
|
|
605
533
|
|
|
606
|
-
<function model="l10n_br_fiscal.document.line" name="_onchange_product_id_fiscal">
|
|
607
|
-
<value eval="[ref('demo_nfe_line_sn_nao_contribuinte_7-1')]" />
|
|
608
|
-
</function>
|
|
609
|
-
|
|
610
534
|
<record
|
|
611
535
|
id="demo_nfe_line_sn_nao_contribuinte_7-1"
|
|
612
536
|
model="l10n_br_fiscal.document.line"
|
|
@@ -630,10 +554,6 @@
|
|
|
630
554
|
<field name="fiscal_operation_line_id" ref="l10n_br_fiscal.fo_venda_venda" />
|
|
631
555
|
</record>
|
|
632
556
|
|
|
633
|
-
<function model="l10n_br_fiscal.document.line" name="_onchange_product_id_fiscal">
|
|
634
|
-
<value eval="[ref('demo_nfe_line_sn_nao_contribuinte_7-2')]" />
|
|
635
|
-
</function>
|
|
636
|
-
|
|
637
557
|
<record
|
|
638
558
|
id="demo_nfe_line_sn_nao_contribuinte_7-2"
|
|
639
559
|
model="l10n_br_fiscal.document.line"
|
|
@@ -680,10 +600,6 @@
|
|
|
680
600
|
<field name="cfop_id" ref="l10n_br_fiscal.cfop_5922" />
|
|
681
601
|
</record>
|
|
682
602
|
|
|
683
|
-
<function model="l10n_br_fiscal.document.line" name="_onchange_product_id_fiscal">
|
|
684
|
-
<value eval="[ref('demo_nfe_line_so_simples_faturamento_7-1')]" />
|
|
685
|
-
</function>
|
|
686
|
-
|
|
687
603
|
<record
|
|
688
604
|
id="demo_nfe_line_so_simples_faturamento_7-1"
|
|
689
605
|
model="l10n_br_fiscal.document.line"
|
|
@@ -723,10 +639,6 @@
|
|
|
723
639
|
/>
|
|
724
640
|
</record>
|
|
725
641
|
|
|
726
|
-
<function model="l10n_br_fiscal.document.line" name="_onchange_product_id_fiscal">
|
|
727
|
-
<value eval="[ref('demo_nfe_purchase_line_same_state_1-1')]" />
|
|
728
|
-
</function>
|
|
729
|
-
|
|
730
642
|
<record
|
|
731
643
|
id="demo_nfe_purchase_line_same_state_1-1"
|
|
732
644
|
model="l10n_br_fiscal.document.line"
|
|
@@ -22,8 +22,4 @@
|
|
|
22
22
|
<field name="fiscal_operation_id" ref="l10n_br_fiscal.fo_venda" />
|
|
23
23
|
<field name="fiscal_operation_line_id" ref="l10n_br_fiscal.fo_venda_servico" />
|
|
24
24
|
</record>
|
|
25
|
-
|
|
26
|
-
<function model="l10n_br_fiscal.document.line" name="_onchange_product_id_fiscal">
|
|
27
|
-
<value eval="[ref('l10n_br_fiscal.demo_nfse_line_same_state_1-1')]" />
|
|
28
|
-
</function>
|
|
29
25
|
</odoo>
|
|
@@ -3,14 +3,14 @@
|
|
|
3
3
|
<record id="fo_venda" model="l10n_br_fiscal.operation">
|
|
4
4
|
<field
|
|
5
5
|
name="comment_ids"
|
|
6
|
-
eval="[(
|
|
6
|
+
eval="[Command.set([ref('l10n_br_fiscal.fiscal_comment_dummy')])]"
|
|
7
7
|
/>
|
|
8
8
|
</record>
|
|
9
9
|
|
|
10
10
|
<record id="fo_venda_venda" model="l10n_br_fiscal.operation.line">
|
|
11
11
|
<field
|
|
12
12
|
name="comment_ids"
|
|
13
|
-
eval="[(
|
|
13
|
+
eval="[Command.set([ref('l10n_br_fiscal.fiscal_line_comment_dummy')])]"
|
|
14
14
|
/>
|
|
15
15
|
</record>
|
|
16
16
|
</odoo>
|
|
@@ -791,14 +791,6 @@ msgstr ""
|
|
|
791
791
|
msgid "Amount Gross"
|
|
792
792
|
msgstr ""
|
|
793
793
|
|
|
794
|
-
#. module: l10n_br_fiscal
|
|
795
|
-
#: model:ir.model.fields,field_description:l10n_br_fiscal.field_l10n_br_fiscal_document__amount_tax
|
|
796
|
-
#: model:ir.model.fields,field_description:l10n_br_fiscal.field_l10n_br_fiscal_document_line__amount_tax
|
|
797
|
-
#: model:ir.model.fields,field_description:l10n_br_fiscal.field_l10n_br_fiscal_document_line_mixin__amount_tax
|
|
798
|
-
#: model:ir.model.fields,field_description:l10n_br_fiscal.field_l10n_br_fiscal_document_mixin__amount_tax
|
|
799
|
-
msgid "Amount Tax"
|
|
800
|
-
msgstr ""
|
|
801
|
-
|
|
802
794
|
#. module: l10n_br_fiscal
|
|
803
795
|
#: model:ir.model.fields,field_description:l10n_br_fiscal.field_l10n_br_fiscal_document_line__amount_tax_included
|
|
804
796
|
#: model:ir.model.fields,field_description:l10n_br_fiscal.field_l10n_br_fiscal_document_line_mixin__amount_tax_included
|
|
@@ -817,22 +809,6 @@ msgstr ""
|
|
|
817
809
|
msgid "Amount Taxed"
|
|
818
810
|
msgstr ""
|
|
819
811
|
|
|
820
|
-
#. module: l10n_br_fiscal
|
|
821
|
-
#: model:ir.model.fields,field_description:l10n_br_fiscal.field_l10n_br_fiscal_document__amount_total
|
|
822
|
-
#: model:ir.model.fields,field_description:l10n_br_fiscal.field_l10n_br_fiscal_document_line__amount_total
|
|
823
|
-
#: model:ir.model.fields,field_description:l10n_br_fiscal.field_l10n_br_fiscal_document_line_mixin__amount_total
|
|
824
|
-
#: model:ir.model.fields,field_description:l10n_br_fiscal.field_l10n_br_fiscal_document_mixin__amount_total
|
|
825
|
-
msgid "Amount Total"
|
|
826
|
-
msgstr ""
|
|
827
|
-
|
|
828
|
-
#. module: l10n_br_fiscal
|
|
829
|
-
#: model:ir.model.fields,field_description:l10n_br_fiscal.field_l10n_br_fiscal_document__amount_untaxed
|
|
830
|
-
#: model:ir.model.fields,field_description:l10n_br_fiscal.field_l10n_br_fiscal_document_line__amount_untaxed
|
|
831
|
-
#: model:ir.model.fields,field_description:l10n_br_fiscal.field_l10n_br_fiscal_document_line_mixin__amount_untaxed
|
|
832
|
-
#: model:ir.model.fields,field_description:l10n_br_fiscal.field_l10n_br_fiscal_document_mixin__amount_untaxed
|
|
833
|
-
msgid "Amount Untaxed"
|
|
834
|
-
msgstr ""
|
|
835
|
-
|
|
836
812
|
#. module: l10n_br_fiscal
|
|
837
813
|
#: model:ir.model.fields,field_description:l10n_br_fiscal.field_l10n_br_fiscal_simplified_tax_range__amount_deduced
|
|
838
814
|
msgid "Amount to be Deducted"
|
|
@@ -2691,6 +2667,30 @@ msgstr ""
|
|
|
2691
2667
|
msgid "Fiscal Additional data manually entered by user"
|
|
2692
2668
|
msgstr ""
|
|
2693
2669
|
|
|
2670
|
+
#. module: l10n_br_fiscal
|
|
2671
|
+
#: model:ir.model.fields,field_description:l10n_br_fiscal.field_l10n_br_fiscal_document__fiscal_amount_tax
|
|
2672
|
+
#: model:ir.model.fields,field_description:l10n_br_fiscal.field_l10n_br_fiscal_document_line__fiscal_amount_tax
|
|
2673
|
+
#: model:ir.model.fields,field_description:l10n_br_fiscal.field_l10n_br_fiscal_document_line_mixin__fiscal_amount_tax
|
|
2674
|
+
#: model:ir.model.fields,field_description:l10n_br_fiscal.field_l10n_br_fiscal_document_mixin__fiscal_amount_tax
|
|
2675
|
+
msgid "Fiscal Amount Tax"
|
|
2676
|
+
msgstr ""
|
|
2677
|
+
|
|
2678
|
+
#. module: l10n_br_fiscal
|
|
2679
|
+
#: model:ir.model.fields,field_description:l10n_br_fiscal.field_l10n_br_fiscal_document__fiscal_amount_total
|
|
2680
|
+
#: model:ir.model.fields,field_description:l10n_br_fiscal.field_l10n_br_fiscal_document_line__fiscal_amount_total
|
|
2681
|
+
#: model:ir.model.fields,field_description:l10n_br_fiscal.field_l10n_br_fiscal_document_line_mixin__fiscal_amount_total
|
|
2682
|
+
#: model:ir.model.fields,field_description:l10n_br_fiscal.field_l10n_br_fiscal_document_mixin__fiscal_amount_total
|
|
2683
|
+
msgid "Fiscal Amount Total"
|
|
2684
|
+
msgstr ""
|
|
2685
|
+
|
|
2686
|
+
#. module: l10n_br_fiscal
|
|
2687
|
+
#: model:ir.model.fields,field_description:l10n_br_fiscal.field_l10n_br_fiscal_document__fiscal_amount_untaxed
|
|
2688
|
+
#: model:ir.model.fields,field_description:l10n_br_fiscal.field_l10n_br_fiscal_document_line__fiscal_amount_untaxed
|
|
2689
|
+
#: model:ir.model.fields,field_description:l10n_br_fiscal.field_l10n_br_fiscal_document_line_mixin__fiscal_amount_untaxed
|
|
2690
|
+
#: model:ir.model.fields,field_description:l10n_br_fiscal.field_l10n_br_fiscal_document_mixin__fiscal_amount_untaxed
|
|
2691
|
+
msgid "Fiscal Amount Untaxed"
|
|
2692
|
+
msgstr ""
|
|
2693
|
+
|
|
2694
2694
|
#. module: l10n_br_fiscal
|
|
2695
2695
|
#: model:ir.model,name:l10n_br_fiscal.model_l10n_br_fiscal_base_wizard_mixin
|
|
2696
2696
|
msgid "Fiscal Base Wizard Mixin"
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Copyright (C) 2025 - Engenere (<https://engenere.one>).
|
|
2
|
+
# @author Antônio S. Pereira Neto <neto@engenere.one>
|
|
3
|
+
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
|
4
|
+
|
|
5
|
+
from openupgradelib import openupgrade
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
@openupgrade.migrate()
|
|
9
|
+
def migrate(env, version):
|
|
10
|
+
field_spec = [
|
|
11
|
+
(
|
|
12
|
+
"l10n_br_fiscal.document",
|
|
13
|
+
"l10n_br_fiscal_document",
|
|
14
|
+
"amount_untaxed",
|
|
15
|
+
"fiscal_amount_untaxed",
|
|
16
|
+
),
|
|
17
|
+
(
|
|
18
|
+
"l10n_br_fiscal.document",
|
|
19
|
+
"l10n_br_fiscal_document",
|
|
20
|
+
"amount_tax",
|
|
21
|
+
"fiscal_amount_tax",
|
|
22
|
+
),
|
|
23
|
+
(
|
|
24
|
+
"l10n_br_fiscal.document",
|
|
25
|
+
"l10n_br_fiscal_document",
|
|
26
|
+
"amount_total",
|
|
27
|
+
"fiscal_amount_total",
|
|
28
|
+
),
|
|
29
|
+
]
|
|
30
|
+
openupgrade.rename_fields(env, field_spec)
|
|
@@ -185,9 +185,9 @@ class Document(models.Model):
|
|
|
185
185
|
)
|
|
186
186
|
|
|
187
187
|
currency_id = fields.Many2one(
|
|
188
|
+
related="company_id.currency_id",
|
|
188
189
|
comodel_name="res.currency",
|
|
189
190
|
string="Currency",
|
|
190
|
-
compute="_compute_currency_id",
|
|
191
191
|
)
|
|
192
192
|
|
|
193
193
|
# this related "state" field is required for the status bar widget
|
|
@@ -325,11 +325,6 @@ class Document(models.Model):
|
|
|
325
325
|
self.fiscal_operation_id = False
|
|
326
326
|
return {"domain": {"fiscal_operation_id": domain}}
|
|
327
327
|
|
|
328
|
-
@api.depends("company_id")
|
|
329
|
-
def _compute_currency_id(self):
|
|
330
|
-
for doc in self:
|
|
331
|
-
doc.currency_id = doc.company_id.currency_id or self.env.company.currency_id
|
|
332
|
-
|
|
333
328
|
def _compute_document_name(self):
|
|
334
329
|
self.ensure_one()
|
|
335
330
|
name = ""
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Copyright (C) 2013 Renato Lima - Akretion
|
|
2
2
|
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
|
|
3
3
|
|
|
4
|
-
from odoo import fields, models
|
|
4
|
+
from odoo import api, fields, models
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
class DocumentLine(models.Model):
|
|
@@ -30,7 +30,12 @@ class DocumentLine(models.Model):
|
|
|
30
30
|
ondelete="cascade",
|
|
31
31
|
)
|
|
32
32
|
|
|
33
|
-
name = fields.Char(
|
|
33
|
+
name = fields.Char(
|
|
34
|
+
compute="_compute_name",
|
|
35
|
+
store=True,
|
|
36
|
+
precompute=True,
|
|
37
|
+
readonly=False,
|
|
38
|
+
)
|
|
34
39
|
|
|
35
40
|
company_id = fields.Many2one(
|
|
36
41
|
comodel_name="res.company",
|
|
@@ -50,6 +55,15 @@ class DocumentLine(models.Model):
|
|
|
50
55
|
precompute=True,
|
|
51
56
|
)
|
|
52
57
|
|
|
58
|
+
uom_id = fields.Many2one(
|
|
59
|
+
comodel_name="uom.uom",
|
|
60
|
+
string="UOM",
|
|
61
|
+
compute="_compute_uom_id",
|
|
62
|
+
store=True,
|
|
63
|
+
readonly=False,
|
|
64
|
+
precompute=True,
|
|
65
|
+
)
|
|
66
|
+
|
|
53
67
|
quantity = fields.Float(default=1.0)
|
|
54
68
|
|
|
55
69
|
ind_final = fields.Selection(related="document_id.ind_final")
|
|
@@ -70,6 +84,22 @@ class DocumentLine(models.Model):
|
|
|
70
84
|
|
|
71
85
|
additional_data = fields.Text()
|
|
72
86
|
|
|
87
|
+
@api.depends("product_id")
|
|
88
|
+
def _compute_name(self):
|
|
89
|
+
for line in self:
|
|
90
|
+
if line.product_id:
|
|
91
|
+
line.name = line.product_id.display_name
|
|
92
|
+
else:
|
|
93
|
+
line.name = False
|
|
94
|
+
|
|
95
|
+
@api.depends("product_id")
|
|
96
|
+
def _compute_uom_id(self):
|
|
97
|
+
for line in self:
|
|
98
|
+
if line.fiscal_operation_type == "in":
|
|
99
|
+
line.uom_id = line.product_id.uom_po_id
|
|
100
|
+
else:
|
|
101
|
+
line.uom_id = line.product_id.uom_id
|
|
102
|
+
|
|
73
103
|
def __document_comment_vals(self):
|
|
74
104
|
self.ensure_one()
|
|
75
105
|
return {
|
|
@@ -80,7 +110,7 @@ class DocumentLine(models.Model):
|
|
|
80
110
|
}
|
|
81
111
|
|
|
82
112
|
def _document_comment(self):
|
|
83
|
-
for
|
|
84
|
-
|
|
85
|
-
|
|
113
|
+
for line in self:
|
|
114
|
+
line.additional_data = line.comment_ids.compute_message(
|
|
115
|
+
line.__document_comment_vals(), line.manual_additional_data
|
|
86
116
|
)
|
|
@@ -36,7 +36,6 @@ from ..constants.icms import (
|
|
|
36
36
|
ICMS_BASE_TYPE,
|
|
37
37
|
ICMS_BASE_TYPE_DEFAULT,
|
|
38
38
|
ICMS_ORIGIN,
|
|
39
|
-
ICMS_ORIGIN_DEFAULT,
|
|
40
39
|
ICMS_ST_BASE_TYPE,
|
|
41
40
|
ICMS_ST_BASE_TYPE_DEFAULT,
|
|
42
41
|
)
|
|
@@ -135,16 +134,31 @@ class FiscalDocumentLineMixin(models.AbstractModel):
|
|
|
135
134
|
|
|
136
135
|
partner_company_type = fields.Selection(related="partner_id.company_type")
|
|
137
136
|
|
|
138
|
-
uom_id = fields.Many2one(
|
|
137
|
+
uom_id = fields.Many2one(
|
|
138
|
+
comodel_name="uom.uom",
|
|
139
|
+
string="UOM",
|
|
140
|
+
)
|
|
139
141
|
|
|
140
142
|
quantity = fields.Float(
|
|
141
143
|
digits="Product Unit of Measure",
|
|
142
144
|
)
|
|
143
145
|
|
|
144
|
-
fiscal_type = fields.Selection(
|
|
146
|
+
fiscal_type = fields.Selection(
|
|
147
|
+
selection=PRODUCT_FISCAL_TYPE,
|
|
148
|
+
compute="_compute_product_fiscal_fields",
|
|
149
|
+
store=True,
|
|
150
|
+
readonly=False,
|
|
151
|
+
precompute=True,
|
|
152
|
+
)
|
|
145
153
|
|
|
146
154
|
ncm_id = fields.Many2one(
|
|
147
|
-
comodel_name="l10n_br_fiscal.ncm",
|
|
155
|
+
comodel_name="l10n_br_fiscal.ncm",
|
|
156
|
+
index=True,
|
|
157
|
+
string="NCM",
|
|
158
|
+
compute="_compute_product_fiscal_fields",
|
|
159
|
+
store=True,
|
|
160
|
+
readonly=False,
|
|
161
|
+
precompute=True,
|
|
148
162
|
)
|
|
149
163
|
|
|
150
164
|
nbm_id = fields.Many2one(
|
|
@@ -152,6 +166,10 @@ class FiscalDocumentLineMixin(models.AbstractModel):
|
|
|
152
166
|
index=True,
|
|
153
167
|
string="NBM",
|
|
154
168
|
domain="[('ncm_ids', '=', ncm_id)]",
|
|
169
|
+
compute="_compute_product_fiscal_fields",
|
|
170
|
+
store=True,
|
|
171
|
+
readonly=False,
|
|
172
|
+
precompute=True,
|
|
155
173
|
)
|
|
156
174
|
|
|
157
175
|
cest_id = fields.Many2one(
|
|
@@ -159,10 +177,20 @@ class FiscalDocumentLineMixin(models.AbstractModel):
|
|
|
159
177
|
index=True,
|
|
160
178
|
string="CEST",
|
|
161
179
|
domain="[('ncm_ids', '=', ncm_id)]",
|
|
180
|
+
compute="_compute_product_fiscal_fields",
|
|
181
|
+
store=True,
|
|
182
|
+
readonly=False,
|
|
183
|
+
precompute=True,
|
|
162
184
|
)
|
|
163
185
|
|
|
164
186
|
nbs_id = fields.Many2one(
|
|
165
|
-
comodel_name="l10n_br_fiscal.nbs",
|
|
187
|
+
comodel_name="l10n_br_fiscal.nbs",
|
|
188
|
+
index=True,
|
|
189
|
+
string="NBS",
|
|
190
|
+
compute="_compute_product_fiscal_fields",
|
|
191
|
+
store=True,
|
|
192
|
+
readonly=False,
|
|
193
|
+
precompute=True,
|
|
166
194
|
)
|
|
167
195
|
|
|
168
196
|
fiscal_operation_id = fields.Many2one(
|
|
@@ -258,11 +286,11 @@ class FiscalDocumentLineMixin(models.AbstractModel):
|
|
|
258
286
|
compute="_compute_fiscal_amounts",
|
|
259
287
|
)
|
|
260
288
|
|
|
261
|
-
|
|
289
|
+
fiscal_amount_untaxed = fields.Monetary(
|
|
262
290
|
compute="_compute_fiscal_amounts",
|
|
263
291
|
)
|
|
264
292
|
|
|
265
|
-
|
|
293
|
+
fiscal_amount_tax = fields.Monetary(
|
|
266
294
|
compute="_compute_fiscal_amounts",
|
|
267
295
|
)
|
|
268
296
|
|
|
@@ -270,7 +298,7 @@ class FiscalDocumentLineMixin(models.AbstractModel):
|
|
|
270
298
|
compute="_compute_fiscal_amounts",
|
|
271
299
|
)
|
|
272
300
|
|
|
273
|
-
|
|
301
|
+
fiscal_amount_total = fields.Monetary(
|
|
274
302
|
compute="_compute_fiscal_amounts",
|
|
275
303
|
)
|
|
276
304
|
|
|
@@ -296,7 +324,12 @@ class FiscalDocumentLineMixin(models.AbstractModel):
|
|
|
296
324
|
amount_tax_withholding = fields.Monetary(string="Tax Withholding")
|
|
297
325
|
|
|
298
326
|
fiscal_genre_id = fields.Many2one(
|
|
299
|
-
comodel_name="l10n_br_fiscal.product.genre",
|
|
327
|
+
comodel_name="l10n_br_fiscal.product.genre",
|
|
328
|
+
string="Fiscal Product Genre",
|
|
329
|
+
compute="_compute_product_fiscal_fields",
|
|
330
|
+
store=True,
|
|
331
|
+
readonly=False,
|
|
332
|
+
precompute=True,
|
|
300
333
|
)
|
|
301
334
|
|
|
302
335
|
fiscal_genre_code = fields.Char(
|
|
@@ -307,10 +340,19 @@ class FiscalDocumentLineMixin(models.AbstractModel):
|
|
|
307
340
|
comodel_name="l10n_br_fiscal.service.type",
|
|
308
341
|
string="Service Type LC 166",
|
|
309
342
|
domain="[('internal_type', '=', 'normal')]",
|
|
343
|
+
compute="_compute_product_fiscal_fields",
|
|
344
|
+
store=True,
|
|
345
|
+
readonly=False,
|
|
346
|
+
precompute=True,
|
|
310
347
|
)
|
|
311
348
|
|
|
312
349
|
city_taxation_code_id = fields.Many2one(
|
|
313
|
-
comodel_name="l10n_br_fiscal.city.taxation.code",
|
|
350
|
+
comodel_name="l10n_br_fiscal.city.taxation.code",
|
|
351
|
+
string="City Taxation Code",
|
|
352
|
+
compute="_compute_product_fiscal_fields",
|
|
353
|
+
store=True,
|
|
354
|
+
readonly=False,
|
|
355
|
+
precompute=True,
|
|
314
356
|
)
|
|
315
357
|
|
|
316
358
|
partner_order = fields.Char(string="Partner Order (xPed)", size=15)
|
|
@@ -331,6 +373,10 @@ class FiscalDocumentLineMixin(models.AbstractModel):
|
|
|
331
373
|
issqn_fg_city_id = fields.Many2one(
|
|
332
374
|
comodel_name="res.city",
|
|
333
375
|
string="ISSQN City",
|
|
376
|
+
compute="_compute_product_fiscal_fields",
|
|
377
|
+
store=True,
|
|
378
|
+
readonly=False,
|
|
379
|
+
precompute=True,
|
|
334
380
|
)
|
|
335
381
|
|
|
336
382
|
# vDeducao
|
|
@@ -487,7 +533,12 @@ class FiscalDocumentLineMixin(models.AbstractModel):
|
|
|
487
533
|
)
|
|
488
534
|
|
|
489
535
|
icms_origin = fields.Selection(
|
|
490
|
-
selection=ICMS_ORIGIN,
|
|
536
|
+
selection=ICMS_ORIGIN,
|
|
537
|
+
string="ICMS Origin",
|
|
538
|
+
compute="_compute_product_fiscal_fields",
|
|
539
|
+
store=True,
|
|
540
|
+
readonly=False,
|
|
541
|
+
precompute=True,
|
|
491
542
|
)
|
|
492
543
|
|
|
493
544
|
# vBC - Valor da base de cálculo do ICMS
|
|
@@ -1620,7 +1671,7 @@ class FiscalDocumentLineMixin(models.AbstractModel):
|
|
|
1620
1671
|
comodel_name="l10n_br_fiscal.comment",
|
|
1621
1672
|
string="Comments",
|
|
1622
1673
|
domain=[("object", "=", FISCAL_COMMENT_LINE)],
|
|
1623
|
-
compute="
|
|
1674
|
+
compute="_compute_comment_ids",
|
|
1624
1675
|
store=True,
|
|
1625
1676
|
precompute=True,
|
|
1626
1677
|
readonly=False,
|