odoo-addon-l10n-es-verifactu-oca 16.0.1.0.0.22__py3-none-any.whl → 16.0.1.0.1__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-es-verifactu-oca might be problematic. Click here for more details.

@@ -11,7 +11,7 @@ Comunicación VERI*FACTU
11
11
  !! This file is generated by oca-gen-addon-readme !!
12
12
  !! changes will be overwritten. !!
13
13
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
14
- !! source digest: sha256:960497d29aae211137264e58bdbc2671705c0dbd4d0385e0f1e1cb8ba8f0f44f
14
+ !! source digest: sha256:7f71d36c4c1dfb3a10a6e5c0c6c5b28287c8959bd26392837ca55a9433abf2b7
15
15
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
16
16
 
17
17
  .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
@@ -1,2 +1,3 @@
1
1
  from . import models
2
2
  from . import wizards
3
+ from .hooks import pre_init_hook, post_init_hook
@@ -7,7 +7,7 @@
7
7
 
8
8
  {
9
9
  "name": "Comunicación VERI*FACTU",
10
- "version": "16.0.1.0.0",
10
+ "version": "16.0.1.0.1",
11
11
  "category": "Accounting/Localizations/EDI",
12
12
  "website": "https://github.com/OCA/l10n-spain",
13
13
  "author": "Aures Tic,ForgeFlow,Tecnativa,Odoo Community Association (OCA)",
@@ -40,4 +40,6 @@
40
40
  "views/report_invoice.xml",
41
41
  "views/verifactu_invoice_entry_response_view.xml",
42
42
  ],
43
+ "pre_init_hook": "pre_init_hook",
44
+ "post_init_hook": "post_init_hook",
43
45
  }
@@ -0,0 +1,43 @@
1
+ # Copyright 2025 Tecnativa - Pedro M. Baeza
2
+ # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
3
+ from odoo import SUPERUSER_ID, api, tools
4
+
5
+
6
+ def pre_init_hook(cr):
7
+ """Avoid the heavy compute methods, specially when account.move table is very
8
+ populated, pre-creating the columns and filling them with sane defaultes. Some of it
9
+ is done on post-init hook.
10
+ WARNING: For special cases like IGIC or other, the default value doesn't serve.
11
+ """
12
+ column_exists = tools.sql.column_exists
13
+ create_column = tools.sql.create_column
14
+ if not column_exists(cr, "account_move", "verifactu_refund_type"):
15
+ create_column(cr, "account_move", "verifactu_refund_type", "varchar")
16
+ cr.execute(
17
+ "UPDATE account_move SET verifactu_refund_type = 'I' "
18
+ "WHERE move_type = 'out_refund'"
19
+ )
20
+ if not column_exists(cr, "account_move", "verifactu_registration_key"):
21
+ create_column(cr, "account_move", "verifactu_registration_key", "int4")
22
+ # Initialization done on post-init
23
+ if not column_exists(cr, "account_move", "verifactu_tax_key"):
24
+ create_column(cr, "account_move", "verifactu_tax_key", "varchar")
25
+ cr.execute(
26
+ "UPDATE account_move SET verifactu_tax_key = '01' "
27
+ "WHERE move_type IN ('out_invoice', 'out_refund')"
28
+ )
29
+
30
+
31
+ def post_init_hook(cr, registry):
32
+ """Perform the initialization of this column once the registration keys have been
33
+ loaded.
34
+ WARNING: Only 01 case is covered here, so existing export/intra-community/other
35
+ invoices should be changed later.
36
+ """
37
+ env = api.Environment(cr, SUPERUSER_ID, {})
38
+ key = env.ref("l10n_es_verifactu_oca.verifactu_registration_keys_01")
39
+ cr.execute(
40
+ "UPDATE account_move SET verifactu_registration_key = %s "
41
+ "WHERE move_type = 'out_refund' AND verifactu_registration_key IS NULL",
42
+ (key.id,),
43
+ )
@@ -66,8 +66,9 @@ class AccountMove(models.Model):
66
66
  and invoice.invoice_date >= invoice.company_id.verifactu_start_date
67
67
  ):
68
68
  invoice.verifactu_enabled = (
69
- invoice.fiscal_position_id
70
- and invoice.fiscal_position_id.aeat_active
69
+ invoice.fiscal_position_id.aeat_active
70
+ if invoice.fiscal_position_id
71
+ else True
71
72
  )
72
73
  else:
73
74
  invoice.verifactu_enabled = False
@@ -372,7 +372,7 @@ ul.auto-toc {
372
372
  !! This file is generated by oca-gen-addon-readme !!
373
373
  !! changes will be overwritten. !!
374
374
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
375
- !! source digest: sha256:960497d29aae211137264e58bdbc2671705c0dbd4d0385e0f1e1cb8ba8f0f44f
375
+ !! source digest: sha256:7f71d36c4c1dfb3a10a6e5c0c6c5b28287c8959bd26392837ca55a9433abf2b7
376
376
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
377
377
  <p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.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/license-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/l10n-spain/tree/16.0/l10n_es_verifactu_oca"><img alt="OCA/l10n-spain" src="https://img.shields.io/badge/github-OCA%2Fl10n--spain-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/l10n-spain-16-0/l10n-spain-16-0-l10n_es_verifactu_oca"><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-spain&amp;target_branch=16.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
378
378
  <p>Módulo para la presentación inmediata de la facturación.</p>
@@ -36,12 +36,12 @@
36
36
  <field
37
37
  name="verifactu_refund_type"
38
38
  string="Refund type"
39
- attrs="{'required': [('verifactu_enabled', '=', True),('move_type', 'in', ('out_refund','in_refund'))], 'invisible': [('move_type', 'not in', ('out_refund','in_refund'))]}"
39
+ attrs="{'required': [('verifactu_enabled', '=', True),('move_type', '=', 'out_refund')], 'invisible': ['|', ('verifactu_enabled', '=', False), ('move_type', '!=', 'out_refund')]}"
40
40
  />
41
41
  <field
42
42
  name="verifactu_refund_specific_type"
43
43
  string="Refund specific type"
44
- attrs="{'invisible': [('move_type', '!=', 'out_refund')]}"
44
+ attrs="{'invisible': ['|', ('verifactu_enabled', '=', False), ('move_type', '!=', 'out_refund')]}"
45
45
  />
46
46
  <field
47
47
  name="verifactu_tax_key"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: odoo-addon-l10n_es_verifactu_oca
3
- Version: 16.0.1.0.0.22
3
+ Version: 16.0.1.0.1
4
4
  Summary: Comunicación VERI*FACTU
5
5
  Home-page: https://github.com/OCA/l10n-spain
6
6
  Author: Aures Tic,ForgeFlow,Tecnativa,Odoo Community Association (OCA)
@@ -28,7 +28,7 @@ Comunicación VERI*FACTU
28
28
  !! This file is generated by oca-gen-addon-readme !!
29
29
  !! changes will be overwritten. !!
30
30
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
31
- !! source digest: sha256:960497d29aae211137264e58bdbc2671705c0dbd4d0385e0f1e1cb8ba8f0f44f
31
+ !! source digest: sha256:7f71d36c4c1dfb3a10a6e5c0c6c5b28287c8959bd26392837ca55a9433abf2b7
32
32
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
33
33
 
34
34
  .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
@@ -1,6 +1,7 @@
1
- odoo/addons/l10n_es_verifactu_oca/README.rst,sha256=lq9FKXWc78h6GNqv-ur8enjpafnxhL0TOiQug24T6bs,7002
2
- odoo/addons/l10n_es_verifactu_oca/__init__.py,sha256=0XNpxETgFdVxFDEw03O8oL3NtTSk3we-HEZW2sPKzIU,43
3
- odoo/addons/l10n_es_verifactu_oca/__manifest__.py,sha256=BBtiWPFoXm9dXgEsyMlfIkwWlX8h-_VNydB3gts1cjM,1724
1
+ odoo/addons/l10n_es_verifactu_oca/README.rst,sha256=WGMHSIUHIPsxSCn9ZNnTGvNzmdNQk_wsqCG14kNFT5g,7002
2
+ odoo/addons/l10n_es_verifactu_oca/__init__.py,sha256=GnWm38RNVl0F1QEHgICghDeuin84Dfykn-GEIm_MLUo,92
3
+ odoo/addons/l10n_es_verifactu_oca/__manifest__.py,sha256=XYcCumEmTApHrTOGzAEyiCJYl_G1PQywjGqXB0X8-Mg,1802
4
+ odoo/addons/l10n_es_verifactu_oca/hooks.py,sha256=nEnFdRpuEt1OwEOOfuj33cXFoZEHhV9vUzEZVIhVxrc,1920
4
5
  odoo/addons/l10n_es_verifactu_oca/data/account_fiscal_position_template_data.xml,sha256=ygqPU7AyTbHW07fdI_PKwnvdueaNirdp9Jx_eI2TTCA,6761
5
6
  odoo/addons/l10n_es_verifactu_oca/data/ir_config_parameter.xml,sha256=JEq2J9YjsjCbFRY9XeoZUuHvP8hs2rhTAgs7fqmFuf8,393
6
7
  odoo/addons/l10n_es_verifactu_oca/data/ir_cron.xml,sha256=tDxDzFoZ4DqbMg1YpceCDKTY4dMAlGc1aA3y2fGPbrA,698
@@ -15,7 +16,7 @@ odoo/addons/l10n_es_verifactu_oca/models/__init__.py,sha256=uFS3hWpkyRKX_MUAV7qG
15
16
  odoo/addons/l10n_es_verifactu_oca/models/account_fiscal_position.py,sha256=u8G-XgHIrqv45amDX0P85DlsyExeshfPgg6gAX72x6Q,1171
16
17
  odoo/addons/l10n_es_verifactu_oca/models/account_fiscal_position_template.py,sha256=qZIXLqVWWI8SvbCjgIbghD2Z1fhtJT-sF02bpItfmxA,576
17
18
  odoo/addons/l10n_es_verifactu_oca/models/account_journal.py,sha256=Opc6Cg__wM5ph_swXDRhToGsX7UXNaCQd5l7WlYHAvU,2638
18
- odoo/addons/l10n_es_verifactu_oca/models/account_move.py,sha256=NpWMY0nWVf-RYClDsp-RFtyeSjqq9diF6oGQ-4YX640,22926
19
+ odoo/addons/l10n_es_verifactu_oca/models/account_move.py,sha256=o56vzs4S1iIHRjV0xj1s45PZvFVTnjR6LTdsTPQ34WM,22955
19
20
  odoo/addons/l10n_es_verifactu_oca/models/aeat_tax_agency.py,sha256=yoxH5aa0sZuBt1sDodzy5_KlJblT4tosNvyenWdU1HY,1138
20
21
  odoo/addons/l10n_es_verifactu_oca/models/res_company.py,sha256=C9wj4RqzyHXy_0Y_6rC3Mm9FyVfJpMDiJN3vfC4Ol1U,1700
21
22
  odoo/addons/l10n_es_verifactu_oca/models/res_partner.py,sha256=9WlymT_18IYyPOTwLoSf0zQiQdBT6bQJEYeUBmno6rE,876
@@ -36,7 +37,7 @@ odoo/addons/l10n_es_verifactu_oca/readme/USAGE.rst,sha256=MsDLP4F-YLdmIFnoVwpx01
36
37
  odoo/addons/l10n_es_verifactu_oca/security/ir.model.access.csv,sha256=xSYMPaYz5lc9A_ngmwaJkTM3onEJ5zlhahprTDxQOAQ,3025
37
38
  odoo/addons/l10n_es_verifactu_oca/security/verifactu_security.xml,sha256=CRVoyXoLa8ovzDMIAc_3F8HOzEkZdnk_JH2YH1n3PkY,227
38
39
  odoo/addons/l10n_es_verifactu_oca/static/description/icon.png,sha256=CgnOEZCwoe6f1vlLwkqFVfc2q_uwBMU0UnXN8j6X5ag,10254
39
- odoo/addons/l10n_es_verifactu_oca/static/description/index.html,sha256=FBnlKGx8tX7EVfVpfvPi7qfmeRjBO36PQV4q6YEvat0,17661
40
+ odoo/addons/l10n_es_verifactu_oca/static/description/index.html,sha256=573N5aqzuqi1hzL_VbDau29TR-QNDyvMGqL-LKz9KlI,17661
40
41
  odoo/addons/l10n_es_verifactu_oca/tests/__init__.py,sha256=6LNl_lyd3IHnmLNKN6TlxcntSYIJ-y159FbnzPF6rPA,73
41
42
  odoo/addons/l10n_es_verifactu_oca/tests/common.py,sha256=-mi0zjo5dJMDCkci_19c9YjH6uOz751HaDS4aoRLJnA,9928
42
43
  odoo/addons/l10n_es_verifactu_oca/tests/test_10n_es_verifactu.py,sha256=Yu6AQa3S2-mCHXNuDlub7LBCr1qrCHgEdR0yt2rlhNM,16041
@@ -48,7 +49,7 @@ odoo/addons/l10n_es_verifactu_oca/tests/json/verifactu_out_invoice_s_iva21s_s_re
48
49
  odoo/addons/l10n_es_verifactu_oca/tests/json/verifactu_out_refund_s_iva10b_s_iva10b_s_iva21s_dict.json,sha256=JooUcpXB3PqAQFnXBRIZmlRquImCsskHGjdTLT8MwfU,1783
49
50
  odoo/addons/l10n_es_verifactu_oca/views/account_fiscal_position_view.xml,sha256=U0iN6aCk2_-ajRlYmEBeMnw8QJqFHMR_Si6IbSgjZfU,1379
50
51
  odoo/addons/l10n_es_verifactu_oca/views/account_journal_view.xml,sha256=wLaFdnKuE3ahMMWM3B4BixrQ4WDyVaO9o6W8FcwBUrU,1284
51
- odoo/addons/l10n_es_verifactu_oca/views/account_move_view.xml,sha256=4wT29OZ2Madaa9SonZ18IPE7Vk5jf36lQFIt0eL5VL8,10927
52
+ odoo/addons/l10n_es_verifactu_oca/views/account_move_view.xml,sha256=6mcIniuvq6ybfouRQ12xfFb3ylQi_bFkT64Jj49p-3A,10974
52
53
  odoo/addons/l10n_es_verifactu_oca/views/aeat_tax_agency_view.xml,sha256=dF2VoTFu-OenP9vRZ8-f2x5Ooxfoey7qEn9kAwV27lQ,1393
53
54
  odoo/addons/l10n_es_verifactu_oca/views/report_invoice.xml,sha256=79RWaXBO59ql3kmnH8tUZOeGYt3YcGMAm7xork_o808,909
54
55
  odoo/addons/l10n_es_verifactu_oca/views/res_company_view.xml,sha256=wkNKWo26dK_wD6_9BGE96JdAsGHjhs_MDo7ZiVC7QH8,2468
@@ -62,7 +63,7 @@ odoo/addons/l10n_es_verifactu_oca/views/verifactu_map_view.xml,sha256=WZYPrdZH1X
62
63
  odoo/addons/l10n_es_verifactu_oca/views/verifactu_registration_keys_view.xml,sha256=xHlr8YQnqyUIg5B1IW_4E6OlMxAabxMfP5KGzODkc4I,1687
63
64
  odoo/addons/l10n_es_verifactu_oca/wizards/__init__.py,sha256=h3RXjkbm-pOsNi6H8t9DO61-oFjlUkha7P_TjOBkPT4,36
64
65
  odoo/addons/l10n_es_verifactu_oca/wizards/account_move_reversal.py,sha256=n2GTu9nmbPji_2aQUepBTUi2VsmJChtU6hkyEh2N_wk,509
65
- odoo_addon_l10n_es_verifactu_oca-16.0.1.0.0.22.dist-info/METADATA,sha256=j0Vvkj0_nBpE0fGXk7SMC-yn-w1CK6dGueEi3TWh1Kw,7670
66
- odoo_addon_l10n_es_verifactu_oca-16.0.1.0.0.22.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
67
- odoo_addon_l10n_es_verifactu_oca-16.0.1.0.0.22.dist-info/top_level.txt,sha256=qBj40grFkGOfDZ2WDSw3y1RnDlgG0u8rP8pvGNdbz4w,5
68
- odoo_addon_l10n_es_verifactu_oca-16.0.1.0.0.22.dist-info/RECORD,,
66
+ odoo_addon_l10n_es_verifactu_oca-16.0.1.0.1.dist-info/METADATA,sha256=-vrgeeMNwwzjLf65o3IHjwShv-FUxi23ERo_lP6IsPc,7667
67
+ odoo_addon_l10n_es_verifactu_oca-16.0.1.0.1.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
68
+ odoo_addon_l10n_es_verifactu_oca-16.0.1.0.1.dist-info/top_level.txt,sha256=qBj40grFkGOfDZ2WDSw3y1RnDlgG0u8rP8pvGNdbz4w,5
69
+ odoo_addon_l10n_es_verifactu_oca-16.0.1.0.1.dist-info/RECORD,,