odoo-addon-l10n-br-fiscal 16.0.2.14.0__py3-none-any.whl → 16.0.2.15.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.

@@ -7,7 +7,7 @@ Módulo fiscal brasileiro
7
7
  !! This file is generated by oca-gen-addon-readme !!
8
8
  !! changes will be overwritten. !!
9
9
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
10
- !! source digest: sha256:56fdc209f90971bb35a433356bdad2a52e104e42d9d3ffc6e5854d1fe2e0d60f
10
+ !! source digest: sha256:1758e930812e7eaceb6d6a3797e64d563472fbf77490fbcc17e8843fb78c0768
11
11
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
12
12
 
13
13
  .. |badge1| image:: https://img.shields.io/badge/maturity-Production%2FStable-green.png
@@ -10,7 +10,7 @@
10
10
  "maintainers": ["renatonlima"],
11
11
  "website": "https://github.com/OCA/l10n-brazil",
12
12
  "development_status": "Production/Stable",
13
- "version": "16.0.2.14.0",
13
+ "version": "16.0.2.15.0",
14
14
  "depends": [
15
15
  "product",
16
16
  "l10n_br_base",
@@ -0,0 +1,19 @@
1
+ # Copyright 2025 Engenere - Antônio S. P. Neto.
2
+ # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
3
+
4
+ from openupgradelib import openupgrade
5
+
6
+
7
+ @openupgrade.migrate()
8
+ def migrate(env, version):
9
+ xmlids_renames = [
10
+ (
11
+ "l10n_br_fiscal.ncm_70200090_ P",
12
+ "l10n_br_fiscal.ncm_70200090_P",
13
+ ),
14
+ (
15
+ "l10n_br_fiscal.ncm_68159990_ P",
16
+ "l10n_br_fiscal.ncm_68159990_P",
17
+ ),
18
+ ]
19
+ openupgrade.rename_xmlids(env.cr, xmlids_renames)
@@ -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:56fdc209f90971bb35a433356bdad2a52e104e42d9d3ffc6e5854d1fe2e0d60f
370
+ !! source digest: sha256:1758e930812e7eaceb6d6a3797e64d563472fbf77490fbcc17e8843fb78c0768
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/16.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-16-0/l10n-brazil-16-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=16.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
373
373
  <p><img alt="image" src="https://raw.githubusercontent.com/OCA/l10n-brazil/16.0/l10n_br_fiscal/static/img/fiscal_dashboard.png" /></p>
@@ -8,7 +8,7 @@ from unicodedata import normalize
8
8
 
9
9
  from erpbrasil.base.misc import punctuation_rm
10
10
 
11
- from odoo.tools import config
11
+ from odoo import SUPERUSER_ID, api, tools
12
12
 
13
13
  from .constants.fiscal import EVENT_ENV_HML, EVENT_ENV_PROD
14
14
 
@@ -47,7 +47,7 @@ def domain_field_codes(
47
47
 
48
48
  def path_edoc_company(company_id):
49
49
  db_name = company_id._cr.dbname
50
- filestore = config.filestore(db_name)
50
+ filestore = tools.config.filestore(db_name)
51
51
  return "/".join([filestore, "edoc", punctuation_rm(company_id.cnpj_cpf)])
52
52
 
53
53
 
@@ -89,3 +89,46 @@ def remove_non_ascii_characters(value):
89
89
  )
90
90
 
91
91
  return result
92
+
93
+
94
+ def set_journal_in_fiscal_operation(cr, company, values):
95
+ """
96
+ Set Journal in Fiscal Operation by 'ir.property'
97
+ :param company: Company Object
98
+ :param values: Dict with Journal and Fiscal Operation
99
+ """
100
+ _logger.info(
101
+ f"Create or Inform Journal in Fiscal Operation for {company.name} Property ..."
102
+ )
103
+ env = api.Environment(cr, SUPERUSER_ID, {})
104
+ for value in values:
105
+ fiscal_operation = value.get("fiscal_operation")
106
+ journal = value.get("journal")
107
+ data_op_fiscal = "l10n_br_fiscal.operation," + str(env.ref(fiscal_operation).id)
108
+ property_fiscal_op = env["ir.property"].search(
109
+ [
110
+ ("res_id", "=", data_op_fiscal),
111
+ ("company_id", "=", company.id),
112
+ ]
113
+ )
114
+
115
+ data_journal = "account.journal," + str(env.ref(journal).id)
116
+ if property_fiscal_op:
117
+ property_fiscal_op.value_reference = data_journal
118
+ else:
119
+ env["ir.property"].create(
120
+ {
121
+ "name": f"{fiscal_operation}_{journal}",
122
+ "fields_id": env["ir.model.fields"]
123
+ .search(
124
+ [
125
+ ("model", "=", "l10n_br_fiscal.operation"),
126
+ ("name", "=", "journal_id"),
127
+ ]
128
+ )
129
+ .id,
130
+ "value": data_journal,
131
+ "res_id": data_op_fiscal,
132
+ "company_id": company.id,
133
+ }
134
+ )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: odoo-addon-l10n_br_fiscal
3
- Version: 16.0.2.14.0
3
+ Version: 16.0.2.15.0.2
4
4
  Requires-Python: >=3.10
5
5
  Requires-Dist: erpbrasil.base>=2.3.0
6
6
  Requires-Dist: odoo-addon-l10n_br_base>=16.0dev,<16.1dev
@@ -25,7 +25,7 @@ Módulo fiscal brasileiro
25
25
  !! This file is generated by oca-gen-addon-readme !!
26
26
  !! changes will be overwritten. !!
27
27
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
28
- !! source digest: sha256:56fdc209f90971bb35a433356bdad2a52e104e42d9d3ffc6e5854d1fe2e0d60f
28
+ !! source digest: sha256:1758e930812e7eaceb6d6a3797e64d563472fbf77490fbcc17e8843fb78c0768
29
29
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
30
30
 
31
31
  .. |badge1| image:: https://img.shields.io/badge/maturity-Production%2FStable-green.png
@@ -1,7 +1,7 @@
1
- odoo/addons/l10n_br_fiscal/README.rst,sha256=vWG3ZGJR3QKBexMg96yVVgpxpYGzGYFQz_bp2iGENJc,13644
1
+ odoo/addons/l10n_br_fiscal/README.rst,sha256=wjsbjrj807Y2ABzH_vO96KpvODi1SFlDhdHYwpqfzM0,13644
2
2
  odoo/addons/l10n_br_fiscal/__init__.py,sha256=BQXfCjW4ehK1W1j0z6k8xN7Q2LoZBCjjvYDkQt6nSkI,2717
3
- odoo/addons/l10n_br_fiscal/__manifest__.py,sha256=uZvxS_zXHhl67JRK3h9i3XIIqgRSMEc6hpZHb4PEE2k,4914
4
- odoo/addons/l10n_br_fiscal/tools.py,sha256=TP8pifcnvh51FM70KxMxpbuU01gAx1BFTbaRZAvqyB0,2484
3
+ odoo/addons/l10n_br_fiscal/__manifest__.py,sha256=a0VBF2ckzo_RjzymriEjNTrsWGxsok5QSZnMJBHDP5w,4914
4
+ odoo/addons/l10n_br_fiscal/tools.py,sha256=4oAxP-kPKq3L3xhNdhOivxWakJa-j0ISpVIBCtsB0NQ,4061
5
5
  odoo/addons/l10n_br_fiscal/constants/fiscal.py,sha256=ICWcrew-iUcWFgF4bLzdjUtbMdaejZ0AucwLFu5u1fo,14935
6
6
  odoo/addons/l10n_br_fiscal/constants/icms.py,sha256=rHlM6jyRvhrIm03sd6guS1xh7SptADLltPmRJ3C_Vh8,3512
7
7
  odoo/addons/l10n_br_fiscal/constants/ipi.py,sha256=uNVkNVLsJdHPTMujOZm_DpO9f2oQcIMapYL3-6YAGqg,702
@@ -57,6 +57,7 @@ odoo/addons/l10n_br_fiscal/demo/subsequent_operation_demo.xml,sha256=Lw8d_H2ebpn
57
57
  odoo/addons/l10n_br_fiscal/i18n/l10n_br_fiscal.pot,sha256=5eTio9IoJ-i4gYzWp0r_X03Hd8s6yPejmvjIRFLpAz4,431159
58
58
  odoo/addons/l10n_br_fiscal/i18n/pt_BR.po,sha256=kgX6hjtpZ4I1xIOy2S-YL848CETHn6v_L6ndzMDYTxY,496094
59
59
  odoo/addons/l10n_br_fiscal/migrations/16.0.2.0.0/pre-migration.py,sha256=tw6d7NZrbOmjEaGHI9y-AMiNWNqf_mceTFqTFXuc6cU,687
60
+ odoo/addons/l10n_br_fiscal/migrations/16.0.2.15.0/pre-migration.py,sha256=5-aWMxFdyNbyw_MJbfyiSFHnm9zxWKYHibOW5GNauWc,517
60
61
  odoo/addons/l10n_br_fiscal/models/__init__.py,sha256=9cB0MRgBhXyl5YvpgZlvdMKkOBMMdZ-Ln08z9zE5660,1783
61
62
  odoo/addons/l10n_br_fiscal/models/cest.py,sha256=FKWv89l6m9LiB-LPN789917BwCkWshSj2nlZ6yrNtpE,1955
62
63
  odoo/addons/l10n_br_fiscal/models/cfop.py,sha256=3MF857TFGVERQcwcDM97-PcM0Xes4uTfPsAPogZG7Q4,3263
@@ -127,7 +128,7 @@ odoo/addons/l10n_br_fiscal/readme/USAGE.md,sha256=Dw3uZaHJCUtV0xFq6VOQvF2G5fS_oS
127
128
  odoo/addons/l10n_br_fiscal/security/fiscal_security.xml,sha256=c4D3MoIsVnkZ1pDY_iw8jM2hBPz3VCkl5JKnm_hkau0,3700
128
129
  odoo/addons/l10n_br_fiscal/security/ir.model.access.csv,sha256=3E9q6uzshDOKbm2zUV8cv2x1EIV3WkAkqjaq4_sOUtM,14918
129
130
  odoo/addons/l10n_br_fiscal/static/description/icon.png,sha256=Vd1HydYBoGCzNfCqxLlch2i2aeCcyxo-uRxWNp6oMbw,14836
130
- odoo/addons/l10n_br_fiscal/static/description/index.html,sha256=NggstEHulTKTbATBPXR1cwB7bYykGP3PIpvG8yFSv-E,26274
131
+ odoo/addons/l10n_br_fiscal/static/description/index.html,sha256=pSTGEaE6HSuC_Gv_I66bPBrI7EDAdqjw0xNTQXO9Amk,26274
131
132
  odoo/addons/l10n_br_fiscal/static/img/fiscal_dashboard.png,sha256=Q0fpqFNqEXh6m6E1aJfzSKV2tQ9lC1Y-ofUt6qxVupc,151668
132
133
  odoo/addons/l10n_br_fiscal/static/img/fiscal_line.png,sha256=S4Q4OGSzGnbfm4W5sQVvnD4uUzxS6tbJGT_gs3pB4K0,134276
133
134
  odoo/addons/l10n_br_fiscal/static/img/fiscal_operation.png,sha256=2614c1XjxwVznh707e9gujlUXg0ttutKD1ZiSMTqyv8,105871
@@ -197,7 +198,7 @@ odoo/addons/l10n_br_fiscal/views/uom_uom.xml,sha256=pqq2l0Vd8nz3oJBoe2GERQFMB3I5
197
198
  odoo/addons/l10n_br_fiscal/wizards/__init__.py,sha256=_sLxjpuJblbtSngjCsnMm7Iur5afF5xLEkAQLu4sy7I,69
198
199
  odoo/addons/l10n_br_fiscal/wizards/base_wizard_mixin.py,sha256=-r25us0vdNCSe11Gnf_tyPtN1qq-JKsL-fgWbPGktRo,2856
199
200
  odoo/addons/l10n_br_fiscal/wizards/document_status_wizard.py,sha256=KsYj5YWWePO7uk0psBsFdnCL71eLWhcyg7_c7J4G6vA,818
200
- odoo_addon_l10n_br_fiscal-16.0.2.14.0.dist-info/METADATA,sha256=Ineoe98iyrbO_XYpS44KNSjs6wJP2fauznMqH2MLz1E,14316
201
- odoo_addon_l10n_br_fiscal-16.0.2.14.0.dist-info/WHEEL,sha256=9fEMia4zL7ZuZbnCOrcYogUhmn4XFIVaJ8G4YGI31xc,81
202
- odoo_addon_l10n_br_fiscal-16.0.2.14.0.dist-info/top_level.txt,sha256=QE6RBQ0QX5f4eFuUcGgU5Kbq1A_qJcDs-e_vpr6pmfU,4
203
- odoo_addon_l10n_br_fiscal-16.0.2.14.0.dist-info/RECORD,,
201
+ odoo_addon_l10n_br_fiscal-16.0.2.15.0.2.dist-info/METADATA,sha256=7LWZ1v38lUqaVzxhIqvd7f7uNku5oZDCIL-WQQWAj10,14318
202
+ odoo_addon_l10n_br_fiscal-16.0.2.15.0.2.dist-info/WHEEL,sha256=9fEMia4zL7ZuZbnCOrcYogUhmn4XFIVaJ8G4YGI31xc,81
203
+ odoo_addon_l10n_br_fiscal-16.0.2.15.0.2.dist-info/top_level.txt,sha256=QE6RBQ0QX5f4eFuUcGgU5Kbq1A_qJcDs-e_vpr6pmfU,4
204
+ odoo_addon_l10n_br_fiscal-16.0.2.15.0.2.dist-info/RECORD,,