Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[16.0] [MIG] l10n_it_fatturapa_out_sp #3392

Merged
merged 10 commits into from
Oct 5, 2023

Conversation

Borruso
Copy link
Contributor

@Borruso Borruso commented Jun 19, 2023

Migration l10n_it_fatturapa_out_sp from 14.0 to 16.0

--
Confermo di aver firmato il CLA https://odoo-community.org/page/cla e di aver letto le linee guida su https://odoo-community.org/page/contributing

@tafaRU
Copy link
Member

tafaRU commented Jun 20, 2023

/ocabot migration l10n_it_fatturapa_out_sp

@OCA-git-bot OCA-git-bot added this to the 16.0 milestone Jun 20, 2023
@OCA-git-bot OCA-git-bot mentioned this pull request Jun 20, 2023
79 tasks
@tafaRU
Copy link
Member

tafaRU commented Jul 6, 2023

@Borruso aggiungere in tests requirements la dipendenza a `split payment. Grazie.

@Borruso
Copy link
Contributor Author

Borruso commented Jul 6, 2023

@Borruso aggiungere in tests requirements la dipendenza a `split payment. Grazie.

test ok

@Borruso Borruso force-pushed the 16.0-mig-l10n_it_fatturapa_out_sp branch from 184ea64 to ddb5780 Compare July 6, 2023 16:02
Copy link
Contributor

@andreampiovesana andreampiovesana left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@SirAionTech SirAionTech left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Grazie della PR!
Potresti modificare la storia dei commit come indicato in https://github.com/OCA/maintainer-tools/wiki/Merge-commits-in-pull-requests?

@Borruso Borruso force-pushed the 16.0-mig-l10n_it_fatturapa_out_sp branch from ddb5780 to 1196ea9 Compare September 7, 2023 12:25
@SirAionTech
Copy link
Contributor

#3387 è stata mergiata, puoi eliminare l'ultimo commit e fare rebase

TheMule71 and others added 10 commits October 3, 2023 08:10
Integration between l10n_fatturapa_out and l10n_split_payment
…apa_out_rc

Also note that it's not possible create a selfinvoice with split payment.

Otherwise if both modules are installed you get the following error:

2021-12-16 15:00:57,290 943831 ERROR test-l10n_it_fatturapa_out_rc_14.0 odoo.addons.l10n_it_fatturapa_out_rc.tests.test_fatturapa_xml_validation: ERROR: TestFatturaPAXMLValidation.test_intra_EU_supplier_refund
Traceback (most recent call last):
  File "/home/tafaru/dev/envs/odoo14/l10n-italy/l10n_it_fatturapa_out_rc/tests/test_fatturapa_xml_validation.py", line 192, in test_intra_EU_supplier_refund
    res = self.run_wizard(invoice.rc_self_invoice_id.id)
  File "/home/tafaru/dev/envs/odoo14/l10n-italy/l10n_it_fatturapa_out/tests/fatturapa_common.py", line 187, in run_wizard
    return wizard.with_context({"active_ids": [invoice_id]}).exportFatturaPA()
  File "/home/tafaru/dev/envs/odoo14/l10n-italy/l10n_it_fatturapa_out/wizard/wizard_export_fatturapa.py", line 151, in exportFatturaPA
    attach = self.saveAttachment(fatturapa, progressivo_invio)
  File "/home/tafaru/dev/envs/odoo14/l10n-italy/l10n_it_fatturapa_out/wizard/wizard_export_fatturapa.py", line 52, in saveAttachment
    attach_str = fatturapa.to_xml(self.env)
  File "/home/tafaru/dev/envs/odoo14/l10n-italy/l10n_it_fatturapa_out/wizard/efattura.py", line 320, in to_xml
    raise UserError("\n".join(str(e) for e in errors))
odoo.exceptions.UserError: failed validating <Element DatiGeneraliDocumento at 0x7fecc1bbbac8> with XsdGroup(model='sequence', occurs=[1, 1]):

Reason: Unexpected child with tag 'ImportoTotaleDocumento' at position 6.

Schema:

  <xs:complexType xmlns:xs="http://www.w3.org/2001/XMLSchema" name="DatiGeneraliDocumentoType">
    <xs:sequence>
      <xs:element name="TipoDocumento" type="TipoDocumentoType" />
      <xs:element name="Divisa" type="DivisaType" />
      <xs:element name="Data" type="DataFatturaType" />
      <xs:element name="Numero" type="String20Type" />
      <xs:element maxOccurs="unbounded" minOccurs="0" name="DatiRitenuta" type="DatiRitenutaType" />
      <xs:element minOccurs="0" name="DatiBollo" type="DatiBolloType" />
      <xs:element maxOccurs="unbounded" minOccurs="0" name="DatiCassaPrevidenziale" type="DatiCassaPrevidenzialeType" />
      <xs:element maxOccurs="unbounded" minOccurs="0" name="ScontoMaggiorazione" type="ScontoMaggiorazioneType" />
      <xs:element minOccurs="0" name="ImportoTotaleDocumento" type="Amount2DecimalType" />
      <xs:element minOccurs="0" name="Arrotondamento" type="Amount2DecimalType" />
      <xs:element maxOccurs="unbounded" minOccurs="0" name="Causale" type="String200LatinType" />
      <xs:element minOccurs="0" name="Art73" type="Art73Type" />
    </xs:sequence>
  </xs:complexType>

Instance (line 130):

  <DatiGeneraliDocumento xmlns:ns1="http://ivaservizi.agenziaentrate.gov.it/docs/xsd/fatture/v1.2"><TipoDocumento>TD17</TipoDocumento><Divisa>EUR</Divisa><Data>2020-12-01</Data><Numero>RSLF/2020/12/0001</Numero><ImportoTotaleDocumento>-122.00</ImportoTotaleDocumento><ImportoTotaleDocumento>122.00</ImportoTotaleDocumento><Causale>Reverse charge self invoice.</Causale><Causale>Supplier: Intra EU supplier</Causale><Causale>Reference: EU-SUPPLIER-REF</Causale><Causale>Date: 2020-12-01</Causale><Causale>Internal reference: RBILL/2020/12/0001</Causale></DatiGeneraliDocumento>

Path: /ns1:FatturaElettronica/FatturaElettronicaBody/DatiGenerali/DatiGeneraliDocumento
2022-07-18 10:49:29,798 268 ERROR odoo odoo.addons.l10n_it_fatturapa_out_sp.tests.test_fatturapa_xml_validation: FAIL: TestFatturaPAXMLValidation.test_4_xml_export
Traceback (most recent call last):
  File "/__w/l10n-italy/l10n-italy/l10n_it_fatturapa_out_sp/tests/test_fatturapa_xml_validation.py", line 91, in test_4_xml_export
    self.check_content(xml_content, "IT06363391001_00004.xml")
  File "/__w/l10n-italy/l10n-italy/l10n_it_fatturapa_out/tests/fatturapa_common.py", line 209, in check_content
    self.assertEqual(etree.tostring(test_fatt), etree.tostring(xml))
AssertionError: b'<ns[1596 chars]016/0016</Numero><ImportoTotaleDocumento>17.08[1123 chars]ica>' != b'<ns[1596 chars]016/06/0001</Numero><ImportoTotaleDocumento>17[1126 chars]ica>'

See https://github.com/OCA/l10n-italy/runs/7387629100?check_suite_focus=true#step:8:909 for reference
Currently translated at 100.0% (4 of 4 strings)

Translation: l10n-italy-14.0/l10n-italy-14.0-l10n_it_fatturapa_out_sp
Translate-URL: https://translation.odoo-community.org/projects/l10n-italy-14-0/l10n-italy-14-0-l10n_it_fatturapa_out_sp/it/
@Borruso Borruso force-pushed the 16.0-mig-l10n_it_fatturapa_out_sp branch from 1196ea9 to 5ae6d52 Compare October 3, 2023 06:10
Copy link
Contributor

@SirAionTech SirAionTech left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Grazie della PR!
Ho fatto revisione della storia dei commit e del codice, per me è ok

@OCA-git-bot
Copy link
Contributor

This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖

@OpenCode
Copy link
Contributor

OpenCode commented Oct 5, 2023

/ocabot merge nobump

@OCA-git-bot
Copy link
Contributor

What a great day to merge this nice PR. Let's do it!
Prepared branch 16.0-ocabot-merge-pr-3392-by-OpenCode-bump-nobump, awaiting test results.

OCA-git-bot added a commit that referenced this pull request Oct 5, 2023
Signed-off-by OpenCode
@OCA-git-bot
Copy link
Contributor

It looks like something changed on 16.0 in the meantime.
Let me try again (no action is required from you).
Prepared branch 16.0-ocabot-merge-pr-3392-by-OpenCode-bump-nobump, awaiting test results.

@OCA-git-bot
Copy link
Contributor

Congratulations, your PR was merged at ca1b0de. Thanks a lot for contributing to OCA. ❤️

@OCA-git-bot OCA-git-bot closed this Oct 5, 2023
@OCA-git-bot OCA-git-bot merged commit dc1a66b into OCA:16.0 Oct 5, 2023
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants