Skip to content

Commit

Permalink
l10n_es_facturae: facturae report according to XSD (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
jabibi authored and ramiadavid committed May 11, 2023
1 parent 95dc348 commit 2705b96
Show file tree
Hide file tree
Showing 4 changed files with 182 additions and 130 deletions.
1 change: 1 addition & 0 deletions l10n_es_facturae/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ Contributors
* Malagatic (http://www.malagatic.es)
* Comunitea (http://www.comunitea.com)
* Pedro M. Baeza <[email protected]>
* Javi Melendez <[email protected]>

Maintainer
----------
Expand Down
54 changes: 54 additions & 0 deletions l10n_es_facturae/tests/facturae_test.xml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,50 @@
<ResidenceTypeCode>R</ResidenceTypeCode>
<TaxIdentificationNumber>ES05680675C</TaxIdentificationNumber>
</TaxIdentification>
<AdministrativeCentres>
<AdministrativeCentre>
<CentreCode>U00000038</CentreCode>
<RoleTypeCode>01</RoleTypeCode>
<AddressInSpain>
<Address>C/ Ejemplo, 13</Address>
<PostCode>13700</PostCode>
<Town>Tomelloso</Town>
<Province>Ciudad Real</Province>
<CountryCode>ESP</CountryCode>
</AddressInSpain>
<ContactDetails>
<ContactPersons>Cliente de prueba</ContactPersons>
</ContactDetails>
</AdministrativeCentre>
<AdministrativeCentre>
<CentreCode>U00000038</CentreCode>
<RoleTypeCode>02</RoleTypeCode>
<AddressInSpain>
<Address>C/ Ejemplo, 13</Address>
<PostCode>13700</PostCode>
<Town>Tomelloso</Town>
<Province>Ciudad Real</Province>
<CountryCode>ESP</CountryCode>
</AddressInSpain>
<ContactDetails>
<ContactPersons>Cliente de prueba</ContactPersons>
</ContactDetails>
</AdministrativeCentre>
<AdministrativeCentre>
<CentreCode>U00000038</CentreCode>
<RoleTypeCode>03</RoleTypeCode>
<AddressInSpain>
<Address>C/ Ejemplo, 13</Address>
<PostCode>13700</PostCode>
<Town>Tomelloso</Town>
<Province>Ciudad Real</Province>
<CountryCode>ESP</CountryCode>
</AddressInSpain>
<ContactDetails>
<ContactPersons>Cliente de prueba</ContactPersons>
</ContactDetails>
</AdministrativeCentre>
</AdministrativeCentres>
<Individual>
<Name>Cliente de prueba</Name>
<FirstSurname/>
Expand Down Expand Up @@ -127,6 +171,16 @@
</TaxesOutputs>
</InvoiceLine>
</Items>
<PaymentDetails>
<Installment>
<InstallmentDueDate>2016-03-12</InstallmentDueDate>
<InstallmentAmount>121.00</InstallmentAmount>
<PaymentMeans>01</PaymentMeans>
<AccountToBeCredited>
<IBAN>BE96 9988 7766 5544</IBAN>
</AccountToBeCredited>
</Installment>
</PaymentDetails>
</Invoice>
</Invoices>
</fe:Facturae>
17 changes: 17 additions & 0 deletions l10n_es_facturae/tests/test_l10n_es_facturae.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,20 +81,37 @@ def setUp(self):
'state_id': self.state.id,
'country_id': self.ref('base.es'),
'vat': 'ES05680675C',
'facturae': True,
'organo_gestor': 'U00000038',
'unidad_tramitadora': 'U00000038',
'oficina_contable': 'U00000038',
})
self.journal = self.env['account.journal'].create({
'name': 'Test journal',
'code': 'TEST',
'type': 'sale',
'currency': self.ref('base.USD'),
})
self.bank = self.env['res.partner.bank'].create({
'state': 'iban',
'acc_number': 'BE96 9988 7766 5544',
})
self.payment_mode = self.env['payment.mode'].create({
'name': 'Test payment mode',
'journal': self.journal.id,
'bank_id': self.bank.id,
'type': self.env.ref('account_banking_payment_export.'
'manual_bank_tranfer').id,
'facturae_code': '01',
})
main_company = self.env.ref('base.main_company')
main_company.currency_id = self.ref('base.USD')
self.invoice = self.env['account.invoice'].create({
'partner_id': self.partner.id,
'account_id': self.partner.property_account_receivable.id,
'journal_id': self.journal.id,
'date_invoice': '2016-03-12',
'payment_mode_id': self.payment_mode.id,
'invoice_line': [
(0, 0, {
'name': 'Producto de prueba',
Expand Down
Loading

0 comments on commit 2705b96

Please sign in to comment.