odoo-addon-l10n-br-fiscal 15.0.1.20.3__py3-none-any.whl → 15.0.2.0.0.2__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.

Files changed (42) hide show
  1. odoo/addons/l10n_br_fiscal/README.rst +1 -1
  2. odoo/addons/l10n_br_fiscal/__manifest__.py +2 -12
  3. odoo/addons/l10n_br_fiscal/i18n/l10n_br_fiscal.pot +0 -796
  4. odoo/addons/l10n_br_fiscal/migrations/16.0.2.0.0/pre-migration.py +25 -0
  5. odoo/addons/l10n_br_fiscal/models/__init__.py +0 -3
  6. odoo/addons/l10n_br_fiscal/models/document.py +62 -20
  7. odoo/addons/l10n_br_fiscal/models/icms_regulation.py +13 -6
  8. odoo/addons/l10n_br_fiscal/models/invalidate_number.py +0 -44
  9. odoo/addons/l10n_br_fiscal/security/ir.model.access.csv +0 -5
  10. odoo/addons/l10n_br_fiscal/static/description/index.html +1 -1
  11. odoo/addons/l10n_br_fiscal/tests/__init__.py +0 -1
  12. odoo/addons/l10n_br_fiscal/tests/test_fiscal_document_generic.py +0 -48
  13. odoo/addons/l10n_br_fiscal/tests/test_fiscal_document_nfse.py +0 -2
  14. odoo/addons/l10n_br_fiscal/tests/test_subsequent_operation.py +2 -1
  15. odoo/addons/l10n_br_fiscal/tests/test_tax_benefit.py +0 -21
  16. odoo/addons/l10n_br_fiscal/views/document_view.xml +3 -67
  17. odoo/addons/l10n_br_fiscal/views/invalidate_number_view.xml +2 -7
  18. odoo/addons/l10n_br_fiscal/views/l10n_br_fiscal_action.xml +0 -34
  19. odoo/addons/l10n_br_fiscal/views/l10n_br_fiscal_menu.xml +0 -19
  20. odoo/addons/l10n_br_fiscal/wizards/__init__.py +0 -6
  21. odoo/addons/l10n_br_fiscal/wizards/base_wizard_mixin.py +0 -5
  22. odoo/addons/l10n_br_fiscal/wizards/document_status_wizard.py +2 -0
  23. {odoo_addon_l10n_br_fiscal-15.0.1.20.3.dist-info → odoo_addon_l10n_br_fiscal-15.0.2.0.0.2.dist-info}/METADATA +3 -3
  24. {odoo_addon_l10n_br_fiscal-15.0.1.20.3.dist-info → odoo_addon_l10n_br_fiscal-15.0.2.0.0.2.dist-info}/RECORD +26 -41
  25. odoo/addons/l10n_br_fiscal/models/document_eletronic.py +0 -234
  26. odoo/addons/l10n_br_fiscal/models/document_event.py +0 -392
  27. odoo/addons/l10n_br_fiscal/models/document_workflow.py +0 -396
  28. odoo/addons/l10n_br_fiscal/tests/test_workflow.py +0 -118
  29. odoo/addons/l10n_br_fiscal/views/document_event_report.xml +0 -15
  30. odoo/addons/l10n_br_fiscal/views/document_event_template.xml +0 -114
  31. odoo/addons/l10n_br_fiscal/views/document_event_view.xml +0 -68
  32. odoo/addons/l10n_br_fiscal/wizards/document_cancel_wizard.py +0 -20
  33. odoo/addons/l10n_br_fiscal/wizards/document_cancel_wizard.xml +0 -30
  34. odoo/addons/l10n_br_fiscal/wizards/document_correction_wizard.py +0 -17
  35. odoo/addons/l10n_br_fiscal/wizards/document_correction_wizard.xml +0 -30
  36. odoo/addons/l10n_br_fiscal/wizards/document_import_wizard_mixin.py +0 -132
  37. odoo/addons/l10n_br_fiscal/wizards/document_import_wizard_mixin.xml +0 -44
  38. odoo/addons/l10n_br_fiscal/wizards/document_status_wizard.xml +0 -58
  39. odoo/addons/l10n_br_fiscal/wizards/invalidate_number_wizard.py +0 -29
  40. odoo/addons/l10n_br_fiscal/wizards/invalidate_number_wizard.xml +0 -30
  41. {odoo_addon_l10n_br_fiscal-15.0.1.20.3.dist-info → odoo_addon_l10n_br_fiscal-15.0.2.0.0.2.dist-info}/WHEEL +0 -0
  42. {odoo_addon_l10n_br_fiscal-15.0.1.20.3.dist-info → odoo_addon_l10n_br_fiscal-15.0.2.0.0.2.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,25 @@
1
+ # Copyright (C) 2024 - TODAY - Raphaël Valyi - Akretion <raphael.valyi@akretion.com.br>
2
+ # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
3
+
4
+ from openupgradelib import openupgrade
5
+
6
+ to_install = "l10n_br_fiscal_edi"
7
+
8
+
9
+ def install_new_modules(cr):
10
+ sql = f"""
11
+ UPDATE ir_module_module
12
+ SET state='to install'
13
+ WHERE name = '{to_install}' AND state='uninstalled'
14
+ """
15
+ openupgrade.logged_query(cr, sql)
16
+
17
+
18
+ @openupgrade.migrate()
19
+ def migrate(env, version):
20
+ install_new_modules(env.cr)
21
+ query = """
22
+ DELETE FROM ir_model_fields
23
+ WHERE model = 'l10n_br_fiscal.document.electronic'
24
+ """
25
+ openupgrade.logged_query(env.cr, query)
@@ -3,15 +3,12 @@
3
3
  from . import data_abstract
4
4
  from . import data_product_abstract
5
5
  from . import data_ncm_nbs_abstract
6
- from . import document_workflow
7
6
  from . import document_fiscal_mixin_methods
8
7
  from . import document_fiscal_mixin_fields
9
8
  from . import document_fiscal_mixin
10
9
  from . import document_move_mixin
11
10
  from . import document_fiscal_line_mixin_methods
12
11
  from . import document_fiscal_line_mixin
13
- from . import document_event
14
- from . import document_eletronic
15
12
  from . import invalidate_number
16
13
  from . import comment
17
14
  from . import ibpt
@@ -10,6 +10,7 @@ from odoo import _, api, fields, models
10
10
  from odoo.exceptions import ValidationError
11
11
 
12
12
  from ..constants.fiscal import (
13
+ DOCUMENT_ISSUER,
13
14
  DOCUMENT_ISSUER_COMPANY,
14
15
  DOCUMENT_ISSUER_DICT,
15
16
  DOCUMENT_ISSUER_PARTNER,
@@ -20,10 +21,13 @@ from ..constants.fiscal import (
20
21
  MODELO_FISCAL_NFCE,
21
22
  MODELO_FISCAL_NFE,
22
23
  MODELO_FISCAL_NFSE,
24
+ SITUACAO_EDOC,
23
25
  SITUACAO_EDOC_AUTORIZADA,
24
26
  SITUACAO_EDOC_CANCELADA,
25
27
  SITUACAO_EDOC_DENEGADA,
28
+ SITUACAO_EDOC_EM_DIGITACAO,
26
29
  SITUACAO_EDOC_INUTILIZADA,
30
+ SITUACAO_FISCAL,
27
31
  )
28
32
 
29
33
 
@@ -49,7 +53,6 @@ class Document(models.Model):
49
53
  _name = "l10n_br_fiscal.document"
50
54
  _inherit = [
51
55
  "l10n_br_fiscal.document.mixin.fields",
52
- "l10n_br_fiscal.document.electronic",
53
56
  "l10n_br_fiscal.document.move.mixin",
54
57
  "mail.thread",
55
58
  ]
@@ -62,6 +65,25 @@ class Document(models.Model):
62
65
  index=True,
63
66
  )
64
67
 
68
+ state_edoc = fields.Selection(
69
+ selection=SITUACAO_EDOC,
70
+ string="Situação e-doc",
71
+ default=SITUACAO_EDOC_EM_DIGITACAO,
72
+ copy=False,
73
+ required=True,
74
+ readonly=True,
75
+ # tracking=True,
76
+ index=True,
77
+ )
78
+
79
+ state_fiscal = fields.Selection(
80
+ selection=SITUACAO_FISCAL,
81
+ string="Situação Fiscal",
82
+ copy=False,
83
+ # tracking=True,
84
+ index=True,
85
+ )
86
+
65
87
  fiscal_operation_id = fields.Many2one(
66
88
  domain="[('state', '=', 'approved'), "
67
89
  "'|', ('fiscal_operation_type', '=', fiscal_operation_type),"
@@ -140,23 +162,6 @@ class Document(models.Model):
140
162
  default=EDOC_PURPOSE_NORMAL,
141
163
  )
142
164
 
143
- event_ids = fields.One2many(
144
- comodel_name="l10n_br_fiscal.event",
145
- inverse_name="document_id",
146
- string="Events",
147
- copy=False,
148
- readonly=True,
149
- )
150
-
151
- correction_event_ids = fields.One2many(
152
- comodel_name="l10n_br_fiscal.event",
153
- inverse_name="document_id",
154
- domain=[("type", "=", "14")],
155
- string="Correction Events",
156
- copy=False,
157
- readonly=True,
158
- )
159
-
160
165
  document_type = fields.Char(
161
166
  string="Document Type Code",
162
167
  related="document_type_id.code",
@@ -171,10 +176,16 @@ class Document(models.Model):
171
176
  copy=False,
172
177
  )
173
178
 
174
- # Você não vai poder fazer isso em modelos que tem state
175
- # TODO Porque não usar o campo state do fiscal.document???
179
+ # this related "state" field is required for the status bar widget
180
+ # while state_edoc avoids colliding with the state field
181
+ # of objects where the fiscal mixin might be injected.
176
182
  state = fields.Selection(related="state_edoc", string="State")
177
183
 
184
+ issuer = fields.Selection(
185
+ selection=DOCUMENT_ISSUER,
186
+ default=DOCUMENT_ISSUER_COMPANY,
187
+ )
188
+
178
189
  document_subsequent_ids = fields.One2many(
179
190
  comodel_name="l10n_br_fiscal.subsequent.document",
180
191
  inverse_name="source_document_id",
@@ -404,6 +415,37 @@ class Document(models.Model):
404
415
 
405
416
  return action
406
417
 
418
+ # the following actions are meant to be implemented in other modules such as
419
+ # l10n_br_fiscal_edi. They are defined here so they can be overriden in modules
420
+ # that don't depend on l10n_br_fiscal_edi (such as l10n_br_account).
421
+ def view_pdf(self):
422
+ pass
423
+
424
+ def view_xml(self):
425
+ pass
426
+
427
+ def action_document_confirm(self):
428
+ pass
429
+
430
+ def action_document_send(self):
431
+ pass
432
+
433
+ def action_document_back2draft(self):
434
+ pass
435
+
436
+ def action_document_cancel(self):
437
+ pass
438
+
439
+ def action_document_invalidate(self):
440
+ pass
441
+
442
+ def action_document_correction(self):
443
+ pass
444
+
445
+ def exec_after_SITUACAO_EDOC_DENEGADA(self, old_state, new_state):
446
+ # see https://github.com/OCA/l10n-brazil/pull/3272
447
+ pass
448
+
407
449
  def _get_email_template(self, state):
408
450
  self.ensure_one()
409
451
  return self.document_type_id.document_email_ids.search(
@@ -2072,6 +2072,7 @@ class ICMSRegulation(models.Model):
2072
2072
  nbm=None,
2073
2073
  cest=None,
2074
2074
  operation_line=None,
2075
+ ind_final=None,
2075
2076
  ):
2076
2077
  self.ensure_one()
2077
2078
  tax_group_icmsst = self.env.ref("l10n_br_fiscal.tax_group_icmsst")
@@ -2081,7 +2082,9 @@ class ICMSRegulation(models.Model):
2081
2082
  company, partner, tax_group_icmsst, ncm, nbm, cest
2082
2083
  )
2083
2084
 
2084
- tax_definitions = self._tax_definition_search(domain, ncm, nbm, cest, product)
2085
+ tax_definitions = self._tax_definition_search(
2086
+ domain, ncm, nbm, cest, product, ind_final
2087
+ )
2085
2088
  return tax_definitions
2086
2089
 
2087
2090
  def map_tax_def_icms_difal(
@@ -2124,6 +2127,7 @@ class ICMSRegulation(models.Model):
2124
2127
  nbm=None,
2125
2128
  cest=None,
2126
2129
  operation_line=None,
2130
+ ind_final=None,
2127
2131
  ):
2128
2132
  self.ensure_one()
2129
2133
  tax_definitions = self.env["l10n_br_fiscal.tax.definition"]
@@ -2142,7 +2146,7 @@ class ICMSRegulation(models.Model):
2142
2146
  )
2143
2147
 
2144
2148
  tax_definitions = self._tax_definition_search(
2145
- domain, ncm, nbm, cest, product
2149
+ domain, ncm, nbm, cest, product, ind_final
2146
2150
  )
2147
2151
 
2148
2152
  return tax_definitions
@@ -2156,6 +2160,7 @@ class ICMSRegulation(models.Model):
2156
2160
  nbm=None,
2157
2161
  cest=None,
2158
2162
  operation_line=None,
2163
+ ind_final=None,
2159
2164
  ):
2160
2165
  self.ensure_one()
2161
2166
  tax_definitions = self.env["l10n_br_fiscal.tax.definition"]
@@ -2166,7 +2171,9 @@ class ICMSRegulation(models.Model):
2166
2171
  company, partner, tax_group_icmsfcpst, ncm, nbm, cest
2167
2172
  )
2168
2173
 
2169
- tax_definitions = self._tax_definition_search(domain, ncm, nbm, cest, product)
2174
+ tax_definitions = self._tax_definition_search(
2175
+ domain, ncm, nbm, cest, product, ind_final
2176
+ )
2170
2177
 
2171
2178
  return tax_definitions
2172
2179
 
@@ -2197,15 +2204,15 @@ class ICMSRegulation(models.Model):
2197
2204
  )
2198
2205
 
2199
2206
  icms_def_taxes |= self._map_tax_def_icmsst(
2200
- company, partner, product, ncm, nbm, cest, operation_line
2207
+ company, partner, product, ncm, nbm, cest, operation_line, ind_final
2201
2208
  )
2202
2209
 
2203
2210
  icms_def_taxes |= self._map_tax_def_icmsfcp(
2204
- company, partner, product, ncm, nbm, cest, operation_line
2211
+ company, partner, product, ncm, nbm, cest, operation_line, ind_final
2205
2212
  )
2206
2213
 
2207
2214
  icms_def_taxes |= self._map_tax_def_icmsfcpst(
2208
- company, partner, product, ncm, nbm, cest, operation_line
2215
+ company, partner, product, ncm, nbm, cest, operation_line, ind_final
2209
2216
  )
2210
2217
 
2211
2218
  icms_taxes |= icms_def_taxes.mapped("tax_id")
@@ -82,50 +82,6 @@ class InvalidateNumber(models.Model):
82
82
  default="draft",
83
83
  )
84
84
 
85
- event_ids = fields.One2many(
86
- comodel_name="l10n_br_fiscal.event",
87
- inverse_name="invalidate_number_id",
88
- string="Events",
89
- readonly=True,
90
- states={"done": [("readonly", True)]},
91
- )
92
-
93
- # Authorization Event Related Fields
94
- authorization_event_id = fields.Many2one(
95
- comodel_name="l10n_br_fiscal.event",
96
- string="Authorization Event",
97
- readonly=True,
98
- copy=False,
99
- )
100
-
101
- authorization_date = fields.Datetime(
102
- string="Authorization Date",
103
- readonly=True,
104
- related="authorization_event_id.protocol_date",
105
- )
106
-
107
- authorization_protocol = fields.Char(
108
- string="Authorization Protocol",
109
- related="authorization_event_id.protocol_number",
110
- readonly=True,
111
- )
112
-
113
- send_file_id = fields.Many2one(
114
- comodel_name="ir.attachment",
115
- related="authorization_event_id.file_request_id",
116
- string="Send Document File XML",
117
- ondelete="restrict",
118
- readonly=True,
119
- )
120
-
121
- authorization_file_id = fields.Many2one(
122
- comodel_name="ir.attachment",
123
- related="authorization_event_id.file_response_id",
124
- string="Authorization File XML",
125
- ondelete="restrict",
126
- readonly=True,
127
- )
128
-
129
85
  @api.constrains("number_start", "number_end")
130
86
  def _check_range(self):
131
87
  for record in self:
@@ -93,14 +93,9 @@
93
93
  "uom_alternative_user","UOM alternative for User","model_uom_uom_alternative","l10n_br_fiscal.group_user",1,0,0,0
94
94
  "uom_alternative_manager","UOM alternative for Manager","model_uom_uom_alternative","l10n_br_fiscal.group_manager",1,0,0,0
95
95
  "uom_alternative_maintenance","UOM alternative for Maintenance","model_uom_uom_alternative","l10n_br_fiscal.group_data_maintenance",1,1,1,1
96
- "l10n_br_fiscal_event_user","Fiscal Document Event for User","model_l10n_br_fiscal_event","l10n_br_fiscal.group_user",1,1,1,0
97
96
  "l10n_br_fiscal_invalidate_number_user","user_l10n_br_fiscal_invalidate_number","model_l10n_br_fiscal_invalidate_number","l10n_br_fiscal.group_user",1,0,0,0
98
97
  "l10n_br_fiscal_invalidate_number_manager","manager_l10n_br_fiscal_invalidate_number","model_l10n_br_fiscal_invalidate_number","l10n_br_fiscal.group_manager",1,1,1,1
99
98
  "l10n_br_fiscal_city_taxation_code_user","Fiscal City Taxation Code for User","model_l10n_br_fiscal_city_taxation_code","l10n_br_fiscal.group_user",1,1,1,0
100
99
  "l10n_br_fiscal_city_taxation_code_manager","Fiscal City Taxation Code for Manager","model_l10n_br_fiscal_city_taxation_code","l10n_br_fiscal.group_user",1,1,1,1
101
100
  "l10n_br_fiscal_base_wizard_mixin_user",l10n_br_fiscal_base_wizard_mixin,model_l10n_br_fiscal_base_wizard_mixin,base.group_user,1,1,1,1
102
- "l10n_br_fiscal_document_cancel_wizard_user",l10n_br_fiscal_document_cancel_wizard,model_l10n_br_fiscal_document_cancel_wizard,base.group_user,1,1,1,1
103
- "l10n_br_fiscal_document_correction_wizard_user",l10n_br_fiscal_document_correction_wizard,model_l10n_br_fiscal_document_correction_wizard,base.group_user,1,1,1,1
104
101
  "l10n_br_fiscal_document_status_wizard_user",l10n_br_fiscal_document_status_wizard,model_l10n_br_fiscal_document_status_wizard,base.group_user,1,1,1,1
105
- "l10n_br_fiscal_invalidate_number_wizard_user",l10n_br_fiscal_invalidate_number_wizard,model_l10n_br_fiscal_invalidate_number_wizard,base.group_user,1,1,1,1
106
- "l10n_br_fiscal_document_import_wizard_mixin_user",l10n_br_fiscal_document_import_wizard_mixin_user,model_l10n_br_fiscal_document_import_wizard_mixin,base.group_user,1,1,1,1
@@ -367,7 +367,7 @@ ul.auto-toc {
367
367
  !! This file is generated by oca-gen-addon-readme !!
368
368
  !! changes will be overwritten. !!
369
369
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
370
- !! source digest: sha256:c7f252e4f8791d96f0ed30fe6d126e82bbfd888301db36b6429f64926eba8be8
370
+ !! source digest: sha256:4cafe6a97f7e64b48d90a5e607def8a51b77a7738e996aad3a440256c357ab91
371
371
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
372
372
  <p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Production/Stable" src="https://img.shields.io/badge/maturity-Production%2FStable-green.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/l10n-brazil/tree/15.0/l10n_br_fiscal"><img alt="OCA/l10n-brazil" src="https://img.shields.io/badge/github-OCA%2Fl10n--brazil-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/l10n-brazil-15-0/l10n-brazil-15-0-l10n_br_fiscal"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/l10n-brazil&amp;target_branch=15.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
373
373
  <img alt="https://raw.githubusercontent.com/OCA/l10n-brazil/15.0/l10n_br_fiscal/static/img/fiscal_dashboard.png" src="https://raw.githubusercontent.com/OCA/l10n-brazil/15.0/l10n_br_fiscal/static/img/fiscal_dashboard.png" />
@@ -14,5 +14,4 @@ from . import (
14
14
  test_service_type,
15
15
  test_subsequent_operation,
16
16
  test_uom_uom,
17
- test_workflow,
18
17
  )
@@ -5,12 +5,6 @@
5
5
 
6
6
  from odoo.tests import TransactionCase
7
7
 
8
- from ..constants.fiscal import (
9
- SITUACAO_EDOC_A_ENVIAR,
10
- SITUACAO_EDOC_AUTORIZADA,
11
- SITUACAO_EDOC_CANCELADA,
12
- SITUACAO_EDOC_EM_DIGITACAO,
13
- )
14
8
  from ..constants.icms import ICMS_ORIGIN_TAX_IMPORTED
15
9
 
16
10
 
@@ -172,26 +166,9 @@ class TestFiscalDocumentGeneric(TransactionCase):
172
166
 
173
167
  self.nfe_same_state.action_document_confirm()
174
168
 
175
- self.assertEqual(
176
- self.nfe_same_state.state_edoc,
177
- SITUACAO_EDOC_A_ENVIAR,
178
- "Document is not in To Sent state",
179
- )
180
-
181
- self.nfe_same_state.action_document_send()
182
-
183
- self.assertEqual(
184
- self.nfe_same_state.state_edoc,
185
- SITUACAO_EDOC_AUTORIZADA,
186
- "Document is not in Authorized state",
187
- )
188
-
189
169
  # Total value of the products
190
170
  self.assertEqual(self.nfe_same_state.amount_price_gross, 200)
191
171
 
192
- result = self.nfe_same_state.action_document_cancel()
193
- self.assertTrue(result)
194
-
195
172
  def test_nfe_other_state(self):
196
173
  """Test NFe other state."""
197
174
 
@@ -1164,28 +1141,3 @@ class TestFiscalDocumentGeneric(TransactionCase):
1164
1141
  "Unexpected value for the field"
1165
1142
  " Other Values in Fiscal Document line",
1166
1143
  )
1167
-
1168
- def test_nfe_purchase_same_state(self):
1169
- self.nfe_purchase_same_state.action_document_confirm()
1170
-
1171
- self.assertEqual(
1172
- self.nfe_purchase_same_state.state_edoc,
1173
- SITUACAO_EDOC_AUTORIZADA,
1174
- "Document is not in Authorized state",
1175
- )
1176
-
1177
- self.nfe_purchase_same_state.action_document_back2draft()
1178
-
1179
- self.assertEqual(
1180
- self.nfe_purchase_same_state.state_edoc,
1181
- SITUACAO_EDOC_EM_DIGITACAO,
1182
- "Document is not in Draft state",
1183
- )
1184
-
1185
- self.nfe_purchase_same_state.action_document_cancel()
1186
-
1187
- self.assertEqual(
1188
- self.nfe_purchase_same_state.state_edoc,
1189
- SITUACAO_EDOC_CANCELADA,
1190
- "Document is not in Canceled state",
1191
- )
@@ -46,5 +46,3 @@ class TestFiscalDocumentNFSe(TransactionCase):
46
46
  "Error to mapping ICMS CST Tributada com permissão de crédito"
47
47
  " for Venda de Serviço de Contribuinte Dentro do Estado.",
48
48
  )
49
-
50
- self.nfse_same_state.action_document_confirm()
@@ -33,7 +33,8 @@ class TestSubsequentOperation(TransactionCase):
33
33
  line._onchange_product_id_fiscal()
34
34
  line._onchange_fiscal_taxes()
35
35
 
36
- self.nfe_simples_faturamento.action_document_confirm()
36
+ self.nfe_simples_faturamento.state_edoc = "a_enviar"
37
+ self.nfe_simples_faturamento._generates_subsequent_operations()
37
38
 
38
39
  subsequent_documents = self.nfe_simples_faturamento.document_subsequent_ids
39
40
 
@@ -3,8 +3,6 @@
3
3
 
4
4
  from odoo.tests import TransactionCase
5
5
 
6
- from ..constants.fiscal import SITUACAO_EDOC_A_ENVIAR, SITUACAO_EDOC_AUTORIZADA
7
-
8
6
 
9
7
  class TestTaxBenefit(TransactionCase):
10
8
  def setUp(self):
@@ -53,22 +51,3 @@ class TestTaxBenefit(TransactionCase):
53
51
  self.tax_benefit,
54
52
  "Document line must have tax benefit",
55
53
  )
56
-
57
- self.nfe_tax_benefit.action_document_confirm()
58
-
59
- self.assertEqual(
60
- self.nfe_tax_benefit.state_edoc,
61
- SITUACAO_EDOC_A_ENVIAR,
62
- "Document is not in To Send state",
63
- )
64
-
65
- self.nfe_tax_benefit.action_document_send()
66
-
67
- self.assertEqual(
68
- self.nfe_tax_benefit.state_edoc,
69
- SITUACAO_EDOC_AUTORIZADA,
70
- "Document is not in Authorized state",
71
- )
72
-
73
- result = self.nfe_tax_benefit.action_document_cancel()
74
- self.assertTrue(result)
@@ -94,7 +94,7 @@
94
94
  <field name="fiscal_operation_type" invisible="1" />
95
95
  <field name="document_type" invisible="1" />
96
96
  <header>
97
- <!-- Please use one state_edoc and attrs to maintain compatibility with invoice -->
97
+ <!-- Please use state_edoc and attrs to maintain compatibility with invoice -->
98
98
  <button
99
99
  name="action_document_confirm"
100
100
  type="object"
@@ -198,10 +198,7 @@
198
198
  attrs="{'invisible': [('state_edoc','not in',('rejeitada', 'denegada'))]}"
199
199
  >
200
200
  Fiscal Document: <field name="document_type_id" readonly="1" /> is <strong
201
- ><field name="state_edoc" readonly="1" /></strong>: <field
202
- name="status_description"
203
- readonly="1"
204
- />
201
+ ><field name="state_edoc" readonly="1" /></strong>
205
202
  </div>
206
203
  <div
207
204
  class="alert alert-success"
@@ -300,6 +297,7 @@
300
297
  </group>
301
298
  </group>
302
299
  <group name="company_info" string="Company">
300
+ <field name="company_id" invisible="1" />
303
301
  <field
304
302
  name="company_id"
305
303
  required="1"
@@ -405,68 +403,6 @@
405
403
  <field name="force_compute_delivery_costs_by_total" />
406
404
  </group>
407
405
  </page>
408
- <page name="others" string="Others">
409
- <group>
410
- <field name="operation_name" />
411
- <field
412
- name="status_description"
413
- attrs="{'invisible': [('document_electronic', '=', '0')]}"
414
- />
415
- </group>
416
- <group>
417
- <group name="authorization" string="Authorization" colspan="4">
418
- <field name="authorization_event_id" />
419
- <field name="authorization_date" />
420
- <field name="authorization_protocol" />
421
- <field name="send_file_id" />
422
- <field name="authorization_file_id" />
423
- <field name="file_report_id" />
424
- </group>
425
- <group
426
- name="cancel"
427
- string="Cancellation"
428
- colspan="4"
429
- attrs="{'invisible': [('state_edoc', '!=', 'cancelada')]}"
430
- >
431
- <field name="cancel_event_id" />
432
- <field name="cancel_date" />
433
- <field name="cancel_protocol_number" />
434
- <field name="cancel_reason" />
435
- <field name="cancel_file_id" />
436
- </group>
437
- <group
438
- name="corrections"
439
- string="Corrections"
440
- colspan="4"
441
- attrs="{'invisible': [('correction_event_ids', '=', [])]}"
442
- >
443
- <field name="correction_event_ids" nolabel="1">
444
- <tree>
445
- <field name="id" />
446
- <field name="justification" />
447
- <field name="create_date" />
448
- <field name="state" />
449
- <button
450
- name="print_document_event"
451
- icon="fa-print"
452
- type="object"
453
- />
454
- </tree>
455
- </field>
456
- </group>
457
- <group name="events" string="Events and Services" colspan="4">
458
- <field name="event_ids" nolabel="1">
459
- <tree>
460
- <field name="id" />
461
- <field name="type" />
462
- <field name="origin" />
463
- <field name="create_date" />
464
- <field name="state" />
465
- </tree>
466
- </field>
467
- </group>
468
- </group>
469
- </page>
470
406
  <page name="amounts" string="Amounts">
471
407
  <group>
472
408
  <group>
@@ -42,21 +42,16 @@
42
42
  class="oe_highlight"
43
43
  />
44
44
  </header>
45
- <group>
45
+ <group name="serie">
46
46
  <field name="company_id" />
47
47
  <field name="document_type_id" />
48
48
  <field name="document_serie_id" />
49
49
  </group>
50
- <group>
50
+ <group name="invalidation">
51
51
  <field name="number_start" />
52
52
  <field name="number_end" />
53
53
  <field name="justification" />
54
54
  </group>
55
- <notebook>
56
- <page string="Events">
57
- <field name="event_ids" />
58
- </page>
59
- </notebook>
60
55
  </form>
61
56
  </field>
62
57
  </record>
@@ -647,40 +647,6 @@
647
647
  </field>
648
648
  </record>
649
649
 
650
- <!-- Document Event -->
651
- <record id="event_action" model="ir.actions.act_window">
652
- <field name="name">Fiscal Event</field>
653
- <field name="type">ir.actions.act_window</field>
654
- <field name="res_model">l10n_br_fiscal.event</field>
655
- <field name="view_mode">kanban,tree,form</field>
656
- <field name="search_view_id" ref="event_search" />
657
- <field name="view_id" ref="event_tree" />
658
- <field name="help" type="html">
659
- <p class="o_view_nocontent_smiling_face">
660
- Create a new Document
661
- </p><p>
662
- Odoo helps you easily track all activities
663
- related to a fiscal operation.
664
- </p>
665
- </field>
666
- </record>
667
-
668
- <!-- Invalidate Number -->
669
- <record id="invalidate_number_action" model="ir.actions.act_window">
670
- <field name="name">Invalidate Number</field>
671
- <field name="type">ir.actions.act_window</field>
672
- <field name="res_model">l10n_br_fiscal.invalidate.number</field>
673
- <field name="view_mode">tree,form</field>
674
- <field name="help" type="html">
675
- <p class="o_view_nocontent_smiling_face">
676
- Create a new Document
677
- </p><p>
678
- Odoo helps you easily track all activities
679
- related to a fiscal operation.
680
- </p>
681
- </field>
682
- </record>
683
-
684
650
  <!-- Config Settings -->
685
651
  <record id="config_action" model="ir.actions.act_window">
686
652
  <field name="name">Settings</field>
@@ -86,25 +86,6 @@
86
86
  sequence="30"
87
87
  />
88
88
 
89
- <!-- Invalidate Number -->
90
- <menuitem
91
- id="invalidate_number_menu"
92
- action="invalidate_number_action"
93
- name="Invalidate Number"
94
- parent="document_sub_menu"
95
- sequence="40"
96
- />
97
-
98
- <!-- Fiscal Events -->
99
- <menuitem
100
- id="event_menu"
101
- action="event_action"
102
- name="Fiscal Event"
103
- groups="l10n_br_fiscal.group_user,l10n_br_fiscal.group_manager"
104
- parent="document_sub_menu"
105
- sequence="50"
106
- />
107
-
108
89
  <!-- Partners -->
109
90
  <menuitem
110
91
  id="partners_menu"
@@ -1,8 +1,2 @@
1
- # License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
2
-
3
1
  from . import base_wizard_mixin
4
- from . import document_cancel_wizard
5
- from . import document_correction_wizard
6
2
  from . import document_status_wizard
7
- from . import invalidate_number_wizard
8
- from . import document_import_wizard_mixin
@@ -36,11 +36,6 @@ class BaseWizardMixin(models.TransientModel):
36
36
 
37
37
  document_serie = fields.Char()
38
38
 
39
- event_id = fields.Many2one(
40
- comodel_name="l10n_br_fiscal.event",
41
- string="Fiscal Event",
42
- )
43
-
44
39
  justification = fields.Text()
45
40
 
46
41
  document_status = fields.Text(string="Status", readonly=True)