odoo-addon-l10n-es-aeat-sii-oca 17.0.1.4.1__py3-none-any.whl → 18.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-aeat-sii-oca might be problematic. Click here for more details.

Files changed (45) hide show
  1. odoo/addons/l10n_es_aeat_sii_oca/README.rst +6 -6
  2. odoo/addons/l10n_es_aeat_sii_oca/__manifest__.py +1 -2
  3. odoo/addons/l10n_es_aeat_sii_oca/data/ir_cron.xml +0 -1
  4. odoo/addons/l10n_es_aeat_sii_oca/i18n/bg.po +68 -136
  5. odoo/addons/l10n_es_aeat_sii_oca/i18n/ca.po +82 -188
  6. odoo/addons/l10n_es_aeat_sii_oca/i18n/cs.po +68 -136
  7. odoo/addons/l10n_es_aeat_sii_oca/i18n/de.po +67 -132
  8. odoo/addons/l10n_es_aeat_sii_oca/i18n/es.po +88 -216
  9. odoo/addons/l10n_es_aeat_sii_oca/i18n/es_CO.po +68 -136
  10. odoo/addons/l10n_es_aeat_sii_oca/i18n/es_CR.po +67 -132
  11. odoo/addons/l10n_es_aeat_sii_oca/i18n/eu.po +68 -136
  12. odoo/addons/l10n_es_aeat_sii_oca/i18n/fr.po +68 -136
  13. odoo/addons/l10n_es_aeat_sii_oca/i18n/gl.po +68 -136
  14. odoo/addons/l10n_es_aeat_sii_oca/i18n/hr.po +68 -136
  15. odoo/addons/l10n_es_aeat_sii_oca/i18n/l10n_es_aeat_sii_oca.pot +6 -70
  16. odoo/addons/l10n_es_aeat_sii_oca/i18n/nl.po +68 -136
  17. odoo/addons/l10n_es_aeat_sii_oca/i18n/pl.po +68 -136
  18. odoo/addons/l10n_es_aeat_sii_oca/i18n/pt.po +68 -136
  19. odoo/addons/l10n_es_aeat_sii_oca/i18n/pt_BR.po +68 -136
  20. odoo/addons/l10n_es_aeat_sii_oca/i18n/ru.po +67 -132
  21. odoo/addons/l10n_es_aeat_sii_oca/i18n/sl.po +68 -136
  22. odoo/addons/l10n_es_aeat_sii_oca/i18n/sv.po +68 -136
  23. odoo/addons/l10n_es_aeat_sii_oca/i18n/tr.po +67 -132
  24. odoo/addons/l10n_es_aeat_sii_oca/i18n/vi.po +68 -136
  25. odoo/addons/l10n_es_aeat_sii_oca/models/account_move.py +31 -40
  26. odoo/addons/l10n_es_aeat_sii_oca/models/aeat_sii_map.py +4 -2
  27. odoo/addons/l10n_es_aeat_sii_oca/models/aeat_sii_mapping_registration_keys.py +4 -6
  28. odoo/addons/l10n_es_aeat_sii_oca/models/res_company.py +0 -5
  29. odoo/addons/l10n_es_aeat_sii_oca/models/sii_mixin.py +35 -38
  30. odoo/addons/l10n_es_aeat_sii_oca/static/description/index.html +4 -4
  31. odoo/addons/l10n_es_aeat_sii_oca/tests/test_l10n_es_aeat_sii.py +2 -42
  32. odoo/addons/l10n_es_aeat_sii_oca/views/account_fiscal_position_view.xml +0 -1
  33. odoo/addons/l10n_es_aeat_sii_oca/views/account_journal_view.xml +0 -1
  34. odoo/addons/l10n_es_aeat_sii_oca/views/account_move_views.xml +2 -8
  35. odoo/addons/l10n_es_aeat_sii_oca/views/aeat_sii_map_view.xml +5 -5
  36. odoo/addons/l10n_es_aeat_sii_oca/views/aeat_sii_mapping_registration_keys_view.xml +4 -4
  37. odoo/addons/l10n_es_aeat_sii_oca/views/res_company_view.xml +0 -1
  38. odoo/addons/l10n_es_aeat_sii_oca/wizards/account_move_send_sii.py +4 -9
  39. odoo/addons/l10n_es_aeat_sii_oca/wizards/account_move_send_sii_views.xml +3 -3
  40. {odoo_addon_l10n_es_aeat_sii_oca-17.0.1.4.1.dist-info → odoo_addon_l10n_es_aeat_sii_oca-18.0.1.0.1.dist-info}/METADATA +11 -11
  41. {odoo_addon_l10n_es_aeat_sii_oca-17.0.1.4.1.dist-info → odoo_addon_l10n_es_aeat_sii_oca-18.0.1.0.1.dist-info}/RECORD +43 -45
  42. odoo/addons/l10n_es_aeat_sii_oca/migrations/17.0.1.0.0/post-migration.py +0 -31
  43. odoo/addons/l10n_es_aeat_sii_oca/views/res_partner_views.xml +0 -15
  44. {odoo_addon_l10n_es_aeat_sii_oca-17.0.1.4.1.dist-info → odoo_addon_l10n_es_aeat_sii_oca-18.0.1.0.1.dist-info}/WHEEL +0 -0
  45. {odoo_addon_l10n_es_aeat_sii_oca-17.0.1.4.1.dist-info → odoo_addon_l10n_es_aeat_sii_oca-18.0.1.0.1.dist-info}/top_level.txt +0 -0
@@ -7,7 +7,7 @@
7
7
  import json
8
8
  import logging
9
9
 
10
- from odoo import _, api, exceptions, fields, models
10
+ from odoo import api, exceptions, fields, models
11
11
  from odoo.exceptions import UserError, ValidationError
12
12
  from odoo.modules.registry import Registry
13
13
  from odoo.tools.float_utils import float_compare
@@ -96,8 +96,8 @@ class SiiMixin(models.AbstractModel):
96
96
  "greater o equal to 100 000 000,00 euros.",
97
97
  compute="_compute_macrodata",
98
98
  )
99
- sii_send_date = fields.Datetime(string="SII Send Date", index=True, copy=False)
100
- sii_needs_cancel = fields.Boolean(readonly=True, copy=False)
99
+ sii_send_date = fields.Datetime(string="SII Send Date", index=True)
100
+ sii_needs_cancel = fields.Boolean(readonly=True)
101
101
 
102
102
  def _compute_sii_refund_type(self):
103
103
  self.sii_refund_type = False
@@ -154,7 +154,7 @@ class SiiMixin(models.AbstractModel):
154
154
  @api.model
155
155
  def _search_sii_enabled(self, operator, value):
156
156
  if self._is_unsupported_search_operator(operator):
157
- raise ValueError(_("Unsupported search operator"))
157
+ raise ValueError(self.env._("Unsupported search operator"))
158
158
  return [("company_id.sii_enabled", operator, value)]
159
159
 
160
160
  def _compute_macrodata(self):
@@ -178,7 +178,9 @@ class SiiMixin(models.AbstractModel):
178
178
  """Do not allow the deletion of records already sent to the SII."""
179
179
  if self._filter_sii_unlink_not_possible():
180
180
  raise exceptions.UserError(
181
- _("You cannot delete an invoice already registered at the SII.")
181
+ self.env._(
182
+ "You cannot delete an invoice already registered at the SII."
183
+ )
182
184
  )
183
185
 
184
186
  @api.model
@@ -234,7 +236,9 @@ class SiiMixin(models.AbstractModel):
234
236
  self.ensure_one()
235
237
  if not self.company_id.vat:
236
238
  raise UserError(
237
- _("No VAT configured for the company '{}'").format(self.company_id.name)
239
+ self.env._("No VAT configured for the company '{}'").format(
240
+ self.company_id.name
241
+ )
238
242
  )
239
243
  header = {
240
244
  "IDVersionSii": SII_VERSION,
@@ -254,50 +258,41 @@ class SiiMixin(models.AbstractModel):
254
258
  return False
255
259
  return True
256
260
 
257
- def _sii_filter_to_send(self):
258
- """Helper method to filter documents to send to SII."""
259
- return self.filtered(
261
+ def send_sii(self):
262
+ documents = self.filtered(
260
263
  lambda document: (
261
264
  document.sii_enabled
262
265
  and document.state in self._get_valid_document_states()
263
266
  and document.aeat_state not in ["sent", "cancelled"]
264
267
  )
265
268
  )
266
-
267
- def send_sii_now(self):
268
- documents = self._sii_filter_to_send()
269
- if documents:
270
- documents._process_sii_send(send_date=fields.Datetime.now())
271
-
272
- def send_sii(self):
273
- documents = self._sii_filter_to_send()
274
269
  if not documents._cancel_send_to_sii():
275
270
  raise UserError(
276
- _(
271
+ self.env._(
277
272
  "You can not communicate this document at this moment. "
278
273
  "Please, try again later."
279
274
  )
280
275
  )
281
276
  if documents:
282
- documents._process_sii_send()
277
+ documents.with_context(bypass_sii_send=True)._process_sii_send()
278
+ sii_send_cron = self.env.ref("l10n_es_aeat_sii_oca.invoice_send_to_sii")
279
+ self.env["ir.cron.trigger"].sudo().create(
280
+ {"cron_id": sii_send_cron.id, "call_at": fields.Datetime.now()}
281
+ )
283
282
 
284
- def _process_sii_send(self, send_date=None):
283
+ def _process_sii_send(self):
285
284
  """Process document sending to the SII. Adds general checks from
286
285
  configuration parameters and document availability for SII."""
287
- if send_date:
288
- self.sii_send_date = send_date
289
- else:
290
- for record in self:
291
- record.sii_send_date = record.company_id._get_sii_sending_time()
286
+ for record in self:
287
+ company = record.company_id
288
+ sii_sending_time = company._get_sii_sending_time()
289
+ record.sii_send_date = sii_sending_time
292
290
  # Create trigger if any company needs to send doc to SII now
293
291
  # so the sending to SII cron is executed as soon as possible
294
- if (
295
- self.company_id.filtered(
296
- lambda company: company.send_mode == "auto"
297
- or (company.send_mode == "delayed" and company.delay_time == 0.0)
298
- )
299
- or send_date
300
- ):
292
+ if self.company_id.filtered(
293
+ lambda company: company.send_mode == "auto"
294
+ or (company.send_mode == "delayed" and company.delay_time == 0.0)
295
+ ) and not self.env.context.get("bypass_sii_send", False):
301
296
  sii_send_cron = self.env.ref("l10n_es_aeat_sii_oca.invoice_send_to_sii")
302
297
  self.env["ir.cron.trigger"].sudo().create(
303
298
  {"cron_id": sii_send_cron.id, "call_at": fields.Datetime.now()}
@@ -361,9 +356,9 @@ class SiiMixin(models.AbstractModel):
361
356
  and not partner.vat
362
357
  and not is_simplified_invoice
363
358
  ):
364
- raise UserError(_("The partner has not a VAT configured."))
359
+ raise UserError(self.env._("The partner has not a VAT configured."))
365
360
  if not self.sii_enabled:
366
- raise UserError(_("This invoice is not SII enabled."))
361
+ raise UserError(self.env._("This invoice is not SII enabled."))
367
362
  return res
368
363
 
369
364
  def _get_document_fiscal_date(self):
@@ -397,7 +392,9 @@ class SiiMixin(models.AbstractModel):
397
392
  product_exempt_causes = self._get_document_product_exempt(applied_taxes)
398
393
  if len(product_exempt_causes) > 1:
399
394
  raise UserError(
400
- _("Currently there's no support for multiple exempt causes.")
395
+ self.env._(
396
+ "Currently there's no support for multiple exempt causes."
397
+ )
401
398
  )
402
399
  if product_exempt_causes:
403
400
  exempt_cause = product_exempt_causes.pop()
@@ -827,9 +824,9 @@ class SiiMixin(models.AbstractModel):
827
824
  and not document.sii_account_registration_date
828
825
  and mapping_key[:2] == "in"
829
826
  ):
830
- doc_vals[
831
- "sii_account_registration_date"
832
- ] = document._get_account_registration_date()
827
+ doc_vals["sii_account_registration_date"] = (
828
+ document._get_account_registration_date()
829
+ )
833
830
  doc_vals["sii_return"] = res
834
831
  send_error = False
835
832
  if res_line["CodigoErrorRegistro"]:
@@ -372,9 +372,9 @@ 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:444645d6f2e381c6e0e63ad7f583e141c0cede1e03247053970b016ecde931ef
375
+ !! source digest: sha256:def49b0f6fde84a36d5a92136d37ac51bc2e2fbea5d28788bf38ed232d1ddd7f
376
376
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
377
- <p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Mature" src="https://img.shields.io/badge/maturity-Mature-brightgreen.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/17.0/l10n_es_aeat_sii_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-17-0/l10n-spain-17-0-l10n_es_aeat_sii_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=17.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
377
+ <p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Mature" src="https://img.shields.io/badge/maturity-Mature-brightgreen.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/18.0/l10n_es_aeat_sii_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-18-0/l10n-spain-18-0-l10n_es_aeat_sii_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=18.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 del IVA
379
379
  <a class="reference external" href="https://www.agenciatributaria.es/static_files/AEAT/Contenidos_Comunes/La_Agencia_Tributaria/Modelos_y_formularios/Suministro_inmediato_informacion/FicherosSuministros/V_1_1/SII_Descripcion_ServicioWeb_v1.1.pdf">https://www.agenciatributaria.es/static_files/AEAT/Contenidos_Comunes/La_Agencia_Tributaria/Modelos_y_formularios/Suministro_inmediato_informacion/FicherosSuministros/V_1_1/SII_Descripcion_ServicioWeb_v1.1.pdf</a></p>
380
380
  <p><strong>Table of contents</strong></p>
@@ -454,7 +454,7 @@ información.</li>
454
454
  <p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/l10n-spain/issues">GitHub Issues</a>.
455
455
  In case of trouble, please check there if your issue has already been reported.
456
456
  If you spotted it first, help us to smash it by providing a detailed and welcomed
457
- <a class="reference external" href="https://github.com/OCA/l10n-spain/issues/new?body=module:%20l10n_es_aeat_sii_oca%0Aversion:%2017.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
457
+ <a class="reference external" href="https://github.com/OCA/l10n-spain/issues/new?body=module:%20l10n_es_aeat_sii_oca%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
458
458
  <p>Do not contact contributors directly about support or help with technical issues.</p>
459
459
  </div>
460
460
  <div class="section" id="credits">
@@ -520,7 +520,7 @@ mission is to support the collaborative development of Odoo features and
520
520
  promote its widespread use.</p>
521
521
  <p>Current <a class="reference external" href="https://odoo-community.org/page/maintainer-role">maintainer</a>:</p>
522
522
  <p><a class="reference external image-reference" href="https://github.com/pedrobaeza"><img alt="pedrobaeza" src="https://github.com/pedrobaeza.png?size=40px" /></a></p>
523
- <p>This module is part of the <a class="reference external" href="https://github.com/OCA/l10n-spain/tree/17.0/l10n_es_aeat_sii_oca">OCA/l10n-spain</a> project on GitHub.</p>
523
+ <p>This module is part of the <a class="reference external" href="https://github.com/OCA/l10n-spain/tree/18.0/l10n_es_aeat_sii_oca">OCA/l10n-spain</a> project on GitHub.</p>
524
524
  <p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
525
525
  </div>
526
526
  </div>
@@ -107,7 +107,7 @@ class TestL10nEsAeatSiiBase(TestL10nEsAeatModBase, TestL10nEsAeatCertificateBase
107
107
  result_dict = invoice._get_aeat_invoice_dict()
108
108
  path = file_path(f"{module}/tests/json/{json_file}")
109
109
  if not path:
110
- raise Exception("Incorrect JSON file: %s" % json_file)
110
+ raise Exception(f"Incorrect JSON file: {json_file}")
111
111
  with open(path) as f:
112
112
  expected_dict = json.loads(f.read())
113
113
  self.assertEqual(expected_dict, result_dict)
@@ -148,7 +148,7 @@ class TestL10nEsAeatSiiBase(TestL10nEsAeatModBase, TestL10nEsAeatCertificateBase
148
148
  {"name": "Test product", "sii_exempt_cause": "E5"}
149
149
  )
150
150
  cls.account_expense = cls.env.ref(
151
- "account.%s_account_common_600" % cls.company.id
151
+ f"account.{cls.company.id}_account_common_600"
152
152
  )
153
153
  cls.invoice = cls._create_invoice("out_invoice")
154
154
  cls.company.write(
@@ -552,43 +552,3 @@ class TestL10nEsAeatSii(TestL10nEsAeatSiiBase):
552
552
  }
553
553
  )
554
554
  self.assertFalse(invoice.sii_enabled)
555
-
556
- def test_send_sii_wizard(self):
557
- invoice = self._create_invoice("out_invoice")
558
- invoice_sii_failed = self._create_invoice("out_invoice")
559
- invoice_sii_modified = self._create_invoice("out_invoice")
560
- (invoice + invoice_sii_failed + invoice_sii_modified).action_post()
561
- (invoice + invoice_sii_failed + invoice_sii_modified).write(
562
- {"sii_send_date": False}
563
- )
564
- invoice_sii_failed.write({"aeat_send_failed": True})
565
- invoice_sii_modified.write({"aeat_state": "sent_modified"})
566
- wizard = (
567
- self.env["wizard.send.sii"]
568
- .with_context(
569
- active_model="account.move",
570
- active_ids=[invoice_sii_failed.id, invoice_sii_modified.id, invoice.id],
571
- )
572
- .create({})
573
- )
574
- self.assertEqual(wizard.not_send_without_errors_number, 1)
575
- self.assertEqual(wizard.with_errors_number, 1)
576
- self.assertEqual(wizard.modified_number, 1)
577
- self.assertFalse(invoice.sii_send_date)
578
- self.assertFalse(invoice_sii_failed.sii_send_date)
579
- self.assertFalse(invoice_sii_modified.sii_send_date)
580
- wizard.action_confirm()
581
- self.assertTrue(invoice.sii_send_date)
582
- self.assertTrue(invoice_sii_failed.sii_send_date)
583
- self.assertTrue(invoice_sii_modified.sii_send_date)
584
-
585
- def test_start_date(self):
586
- self.company.sii_start_date = "2018-01-01"
587
- invoice1 = self._create_invoice("out_invoice")
588
- invoice1.invoice_date = "2019-01-01"
589
- self.assertTrue(invoice1.sii_enabled)
590
- invoice2 = self._create_invoice("out_invoice")
591
- invoice2.invoice_date = "2017-01-01"
592
- self.assertFalse(invoice2.sii_enabled)
593
- self.company.sii_start_date = False
594
- self.assertTrue(invoice2.sii_enabled)
@@ -10,7 +10,6 @@
10
10
  <field name="inherit_id" ref="account.view_account_position_form" />
11
11
  <field name="arch" type="xml">
12
12
  <xpath expr="//field[@name='country_group_id']/.." position="after">
13
- <field name="sii_enabled" invisible="1" />
14
13
  <group string="SII" name="group_sii" invisible="not sii_enabled">
15
14
  <field name="aeat_active" />
16
15
  <field
@@ -11,7 +11,6 @@
11
11
  <attribute name="invisible">type not in ['sale', 'purchase']</attribute>
12
12
  </xpath>
13
13
  <xpath expr="//field[@name='thirdparty_invoice']" position="after">
14
- <field name="company_sii_enabled" invisible="1" />
15
14
  <field
16
15
  name="sii_enabled"
17
16
  invisible="not company_sii_enabled or type not in ['sale', 'purchase']"
@@ -55,7 +55,6 @@
55
55
  name="sii_refund_specific_invoice_type"
56
56
  invisible="move_type != 'out_refund'"
57
57
  />
58
- <field name="sii_registration_key_domain" invisible="1" />
59
58
  <field
60
59
  name="sii_registration_key"
61
60
  groups="account.group_account_invoice"
@@ -75,11 +74,6 @@
75
74
  domain="[('type', '=', sii_registration_key_domain)]"
76
75
  widget="selection"
77
76
  />
78
- <field
79
- name="sii_registration_key_code"
80
- groups="account.group_account_invoice"
81
- invisible="1"
82
- />
83
77
  <label for="sii_send_date" />
84
78
  <div
85
79
  name="sii_send_date"
@@ -89,8 +83,8 @@
89
83
  <button
90
84
  type="object"
91
85
  class="oi oi-arrow-right oe_link"
92
- name="send_sii_now"
93
- string="Send now to SII"
86
+ name="send_sii"
87
+ string="Send to SII"
94
88
  />
95
89
  </div>
96
90
  <field
@@ -5,12 +5,12 @@
5
5
  <field name="name">aeat.sii.map.view.tree</field>
6
6
  <field name="model">aeat.sii.map</field>
7
7
  <field name="arch" type="xml">
8
- <tree>
8
+ <list>
9
9
  <field name="name" />
10
10
  <field name="tax_agency_id" />
11
11
  <field name="date_from" />
12
12
  <field name="date_to" />
13
- </tree>
13
+ </list>
14
14
  </field>
15
15
  </record>
16
16
  <record id="aeat_sii_map_view_form" model="ir.ui.view">
@@ -44,7 +44,7 @@
44
44
  <record model="ir.actions.act_window" id="action_aeat_sii_mapping">
45
45
  <field name="name">Aeat SII Map</field>
46
46
  <field name="res_model">aeat.sii.map</field>
47
- <field name="view_mode">tree,form</field>
47
+ <field name="view_mode">list,form</field>
48
48
  </record>
49
49
  <menuitem
50
50
  id="menu_aeat_sii_map"
@@ -56,11 +56,11 @@
56
56
  <field name="name">aeat.sii.map.lines.view.tree</field>
57
57
  <field name="model">aeat.sii.map.lines</field>
58
58
  <field name="arch" type="xml">
59
- <tree editable="bottom">
59
+ <list editable="bottom">
60
60
  <field name="code" />
61
61
  <field name="name" />
62
62
  <field name="tax_xmlid_ids" widget="many2many_tags" />
63
- </tree>
63
+ </list>
64
64
  </field>
65
65
  </record>
66
66
  </odoo>
@@ -1,16 +1,16 @@
1
1
  <?xml version="1.0" encoding="utf-8" ?>
2
2
  <!-- License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). -->
3
3
  <odoo>
4
- <!-- Tree view -->
4
+ <!-- List view -->
5
5
  <record id="aeat_sii_mapping_registration_keys_view_tree" model="ir.ui.view">
6
6
  <field name="name">aeat.sii.mapping.registration.keys.view.tree</field>
7
7
  <field name="model">aeat.sii.mapping.registration.keys</field>
8
8
  <field name="arch" type="xml">
9
- <tree editable="bottom">
9
+ <list editable="bottom">
10
10
  <field name="code" />
11
11
  <field name="name" />
12
12
  <field name="type" />
13
- </tree>
13
+ </list>
14
14
  </field>
15
15
  </record>
16
16
  <!-- Search view -->
@@ -34,7 +34,7 @@
34
34
  >
35
35
  <field name="name">Aeat SII Registration Keys</field>
36
36
  <field name="res_model">aeat.sii.mapping.registration.keys</field>
37
- <field name="view_mode">tree,form</field>
37
+ <field name="view_mode">list,form</field>
38
38
  </record>
39
39
  <menuitem
40
40
  id="menu_aeat_sii_mapping_registration_keys"
@@ -15,7 +15,6 @@
15
15
  </group>
16
16
  <group invisible="not sii_enabled">
17
17
  <group name="sii_config">
18
- <field name="sii_start_date" />
19
18
  <field name="sii_test" />
20
19
  <field name="sii_method" />
21
20
  <field name="sii_period" />
@@ -1,14 +1,14 @@
1
1
  # Copyright 2023 Pol Reig <pol.reig@qubiq.es>
2
2
  # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
3
3
 
4
- from odoo import fields, models
4
+ from odoo import Command, fields, models
5
5
 
6
6
 
7
7
  class SendSIIWizard(models.TransientModel):
8
8
  _name = "wizard.send.sii"
9
9
  _description = "Send SII Wizard"
10
10
 
11
- moves_to_send = fields.Integer()
11
+ sending_number = fields.Integer()
12
12
  not_send_without_errors_number = fields.Integer()
13
13
  with_errors_number = fields.Integer()
14
14
  modified_number = fields.Integer()
@@ -26,18 +26,13 @@ class SendSIIWizard(models.TransientModel):
26
26
  modified = account_moves.filtered(
27
27
  lambda a: a.aeat_state in ["sent_modified", "cancelled_modified"]
28
28
  )
29
- moves_to_send = account_moves.filtered(
30
- lambda a: a.sii_enabled
31
- and a.state in a._get_valid_document_states()
32
- and a.aeat_state not in ["sent", "cancelled"]
33
- )
34
29
  res.update(
35
30
  {
36
- "moves_to_send": len(moves_to_send),
37
- "account_move_ids": moves_to_send.ids,
31
+ "sending_number": len(account_moves),
38
32
  "not_send_without_errors_number": len(not_send_without_errors),
39
33
  "with_errors_number": len(with_errors),
40
34
  "modified_number": len(modified),
35
+ "account_move_ids": [Command.set(account_moves.ids)],
41
36
  }
42
37
  )
43
38
  return res
@@ -21,12 +21,12 @@
21
21
  <p
22
22
  class="alert alert-warning"
23
23
  role="alert"
24
- invisible="moves_to_send == 0"
24
+ invisible="sending_number == 0"
25
25
  >
26
26
  <field
27
- name="moves_to_send"
27
+ name="sending_number"
28
28
  widget="statinfo"
29
- string="of the selected invoices are being processed to be sent to the SII. If you confirm, they will be sent."
29
+ string="of the selected invoices are being processed to be sent to the SII. If you confirm, they will be resent."
30
30
  />
31
31
  </p>
32
32
  <p
@@ -1,10 +1,10 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: odoo-addon-l10n_es_aeat_sii_oca
3
- Version: 17.0.1.4.1
3
+ Version: 18.0.1.0.1
4
4
  Requires-Python: >=3.10
5
- Requires-Dist: odoo-addon-account_invoice_refund_link>=17.0dev,<17.1dev
6
- Requires-Dist: odoo-addon-l10n_es_aeat>=17.0dev,<17.1dev
7
- Requires-Dist: odoo>=17.0a,<17.1dev
5
+ Requires-Dist: odoo-addon-account_invoice_refund_link==18.0.*
6
+ Requires-Dist: odoo-addon-l10n_es_aeat==18.0.*
7
+ Requires-Dist: odoo==18.0.*
8
8
  Requires-Dist: requests
9
9
  Requires-Dist: zeep
10
10
  Summary: =?utf-8?q?Suministro_Inmediato_de_Informaci=C3=B3n_en_el_IVA?=
@@ -14,7 +14,7 @@ Author: Acysos S.L.,Diagram,Minorisa,Studio73,FactorLibre,Comunitea,Otherway,Tec
14
14
  Author-email: support@odoo-community.org
15
15
  Classifier: Programming Language :: Python
16
16
  Classifier: Framework :: Odoo
17
- Classifier: Framework :: Odoo :: 17.0
17
+ Classifier: Framework :: Odoo :: 18.0
18
18
  Classifier: License :: OSI Approved :: GNU Affero General Public License v3
19
19
  Classifier: Development Status :: 6 - Mature
20
20
  Description-Content-Type: text/x-rst
@@ -32,7 +32,7 @@ Suministro Inmediato de Información en el IVA
32
32
  !! This file is generated by oca-gen-addon-readme !!
33
33
  !! changes will be overwritten. !!
34
34
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
35
- !! source digest: sha256:444645d6f2e381c6e0e63ad7f583e141c0cede1e03247053970b016ecde931ef
35
+ !! source digest: sha256:def49b0f6fde84a36d5a92136d37ac51bc2e2fbea5d28788bf38ed232d1ddd7f
36
36
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
37
37
 
38
38
  .. |badge1| image:: https://img.shields.io/badge/maturity-Mature-brightgreen.png
@@ -42,13 +42,13 @@ Suministro Inmediato de Información en el IVA
42
42
  :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
43
43
  :alt: License: AGPL-3
44
44
  .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fl10n--spain-lightgray.png?logo=github
45
- :target: https://github.com/OCA/l10n-spain/tree/17.0/l10n_es_aeat_sii_oca
45
+ :target: https://github.com/OCA/l10n-spain/tree/18.0/l10n_es_aeat_sii_oca
46
46
  :alt: OCA/l10n-spain
47
47
  .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
48
- :target: https://translation.odoo-community.org/projects/l10n-spain-17-0/l10n-spain-17-0-l10n_es_aeat_sii_oca
48
+ :target: https://translation.odoo-community.org/projects/l10n-spain-18-0/l10n-spain-18-0-l10n_es_aeat_sii_oca
49
49
  :alt: Translate me on Weblate
50
50
  .. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
51
- :target: https://runboat.odoo-community.org/builds?repo=OCA/l10n-spain&target_branch=17.0
51
+ :target: https://runboat.odoo-community.org/builds?repo=OCA/l10n-spain&target_branch=18.0
52
52
  :alt: Try me on Runboat
53
53
 
54
54
  |badge1| |badge2| |badge3| |badge4| |badge5|
@@ -124,7 +124,7 @@ Bug Tracker
124
124
  Bugs are tracked on `GitHub Issues <https://github.com/OCA/l10n-spain/issues>`_.
125
125
  In case of trouble, please check there if your issue has already been reported.
126
126
  If you spotted it first, help us to smash it by providing a detailed and welcomed
127
- `feedback <https://github.com/OCA/l10n-spain/issues/new?body=module:%20l10n_es_aeat_sii_oca%0Aversion:%2017.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
127
+ `feedback <https://github.com/OCA/l10n-spain/issues/new?body=module:%20l10n_es_aeat_sii_oca%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
128
128
 
129
129
  Do not contact contributors directly about support or help with technical issues.
130
130
 
@@ -199,6 +199,6 @@ Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:
199
199
 
200
200
  |maintainer-pedrobaeza|
201
201
 
202
- This module is part of the `OCA/l10n-spain <https://github.com/OCA/l10n-spain/tree/17.0/l10n_es_aeat_sii_oca>`_ project on GitHub.
202
+ This module is part of the `OCA/l10n-spain <https://github.com/OCA/l10n-spain/tree/18.0/l10n_es_aeat_sii_oca>`_ project on GitHub.
203
203
 
204
204
  You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.