trytond-edocument-ubl 8.2.0__tar.gz → 8.2.1__tar.gz

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.
Files changed (70) hide show
  1. {trytond_edocument_ubl-8.2.0 → trytond_edocument_ubl-8.2.1}/PKG-INFO +1 -1
  2. {trytond_edocument_ubl-8.2.0 → trytond_edocument_ubl-8.2.1}/edocument.py +5 -29
  3. {trytond_edocument_ubl-8.2.0 → trytond_edocument_ubl-8.2.1}/template/2/CreditNote.xml +3 -1
  4. {trytond_edocument_ubl-8.2.0 → trytond_edocument_ubl-8.2.1}/tryton.cfg +1 -1
  5. {trytond_edocument_ubl-8.2.0 → trytond_edocument_ubl-8.2.1}/.hgignore +0 -0
  6. {trytond_edocument_ubl-8.2.0 → trytond_edocument_ubl-8.2.1}/COPYRIGHT +0 -0
  7. {trytond_edocument_ubl-8.2.0 → trytond_edocument_ubl-8.2.1}/LICENSE +0 -0
  8. {trytond_edocument_ubl-8.2.0 → trytond_edocument_ubl-8.2.1}/__init__.py +0 -0
  9. {trytond_edocument_ubl-8.2.0 → trytond_edocument_ubl-8.2.1}/account.py +0 -0
  10. {trytond_edocument_ubl-8.2.0 → trytond_edocument_ubl-8.2.1}/account.xml +0 -0
  11. {trytond_edocument_ubl-8.2.0 → trytond_edocument_ubl-8.2.1}/document.py +0 -0
  12. {trytond_edocument_ubl-8.2.0 → trytond_edocument_ubl-8.2.1}/exceptions.py +0 -0
  13. {trytond_edocument_ubl-8.2.0 → trytond_edocument_ubl-8.2.1}/icons/LICENSE +0 -0
  14. {trytond_edocument_ubl-8.2.0 → trytond_edocument_ubl-8.2.1}/locale/bg.po +0 -0
  15. {trytond_edocument_ubl-8.2.0 → trytond_edocument_ubl-8.2.1}/locale/ca.po +0 -0
  16. {trytond_edocument_ubl-8.2.0 → trytond_edocument_ubl-8.2.1}/locale/cs.po +0 -0
  17. {trytond_edocument_ubl-8.2.0 → trytond_edocument_ubl-8.2.1}/locale/de.po +0 -0
  18. {trytond_edocument_ubl-8.2.0 → trytond_edocument_ubl-8.2.1}/locale/es.po +0 -0
  19. {trytond_edocument_ubl-8.2.0 → trytond_edocument_ubl-8.2.1}/locale/es_419.po +0 -0
  20. {trytond_edocument_ubl-8.2.0 → trytond_edocument_ubl-8.2.1}/locale/et.po +0 -0
  21. {trytond_edocument_ubl-8.2.0 → trytond_edocument_ubl-8.2.1}/locale/fa.po +0 -0
  22. {trytond_edocument_ubl-8.2.0 → trytond_edocument_ubl-8.2.1}/locale/fi.po +0 -0
  23. {trytond_edocument_ubl-8.2.0 → trytond_edocument_ubl-8.2.1}/locale/fr.po +0 -0
  24. {trytond_edocument_ubl-8.2.0 → trytond_edocument_ubl-8.2.1}/locale/hu.po +0 -0
  25. {trytond_edocument_ubl-8.2.0 → trytond_edocument_ubl-8.2.1}/locale/id.po +0 -0
  26. {trytond_edocument_ubl-8.2.0 → trytond_edocument_ubl-8.2.1}/locale/it.po +0 -0
  27. {trytond_edocument_ubl-8.2.0 → trytond_edocument_ubl-8.2.1}/locale/lo.po +0 -0
  28. {trytond_edocument_ubl-8.2.0 → trytond_edocument_ubl-8.2.1}/locale/lt.po +0 -0
  29. {trytond_edocument_ubl-8.2.0 → trytond_edocument_ubl-8.2.1}/locale/nl.po +0 -0
  30. {trytond_edocument_ubl-8.2.0 → trytond_edocument_ubl-8.2.1}/locale/pl.po +0 -0
  31. {trytond_edocument_ubl-8.2.0 → trytond_edocument_ubl-8.2.1}/locale/pt.po +0 -0
  32. {trytond_edocument_ubl-8.2.0 → trytond_edocument_ubl-8.2.1}/locale/ro.po +0 -0
  33. {trytond_edocument_ubl-8.2.0 → trytond_edocument_ubl-8.2.1}/locale/ru.po +0 -0
  34. {trytond_edocument_ubl-8.2.0 → trytond_edocument_ubl-8.2.1}/locale/sl.po +0 -0
  35. {trytond_edocument_ubl-8.2.0 → trytond_edocument_ubl-8.2.1}/locale/tr.po +0 -0
  36. {trytond_edocument_ubl-8.2.0 → trytond_edocument_ubl-8.2.1}/locale/uk.po +0 -0
  37. {trytond_edocument_ubl-8.2.0 → trytond_edocument_ubl-8.2.1}/locale/zh_CN.po +0 -0
  38. {trytond_edocument_ubl-8.2.0 → trytond_edocument_ubl-8.2.1}/message.xml +0 -0
  39. {trytond_edocument_ubl-8.2.0 → trytond_edocument_ubl-8.2.1}/party.py +0 -0
  40. {trytond_edocument_ubl-8.2.0 → trytond_edocument_ubl-8.2.1}/pyproject.toml +0 -0
  41. {trytond_edocument_ubl-8.2.0 → trytond_edocument_ubl-8.2.1}/template/2/Invoice.xml +0 -0
  42. {trytond_edocument_ubl-8.2.0 → trytond_edocument_ubl-8.2.1}/template/2/base.xml +0 -0
  43. {trytond_edocument_ubl-8.2.0 → trytond_edocument_ubl-8.2.1}/tests/2.4/common/BDNDR-CCTS_CCT_SchemaModule-1.1.xsd +0 -0
  44. {trytond_edocument_ubl-8.2.0 → trytond_edocument_ubl-8.2.1}/tests/2.4/common/BDNDR-UnqualifiedDataTypes-1.1.xsd +0 -0
  45. {trytond_edocument_ubl-8.2.0 → trytond_edocument_ubl-8.2.1}/tests/2.4/common/UBL-CommonAggregateComponents-2.4.xsd +0 -0
  46. {trytond_edocument_ubl-8.2.0 → trytond_edocument_ubl-8.2.1}/tests/2.4/common/UBL-CommonBasicComponents-2.4.xsd +0 -0
  47. {trytond_edocument_ubl-8.2.0 → trytond_edocument_ubl-8.2.1}/tests/2.4/common/UBL-CommonExtensionComponents-2.4.xsd +0 -0
  48. {trytond_edocument_ubl-8.2.0 → trytond_edocument_ubl-8.2.1}/tests/2.4/common/UBL-CommonSignatureComponents-2.4.xsd +0 -0
  49. {trytond_edocument_ubl-8.2.0 → trytond_edocument_ubl-8.2.1}/tests/2.4/common/UBL-ExtensionContentDataType-2.4.xsd +0 -0
  50. {trytond_edocument_ubl-8.2.0 → trytond_edocument_ubl-8.2.1}/tests/2.4/common/UBL-QualifiedDataTypes-2.4.xsd +0 -0
  51. {trytond_edocument_ubl-8.2.0 → trytond_edocument_ubl-8.2.1}/tests/2.4/common/UBL-SignatureAggregateComponents-2.4.xsd +0 -0
  52. {trytond_edocument_ubl-8.2.0 → trytond_edocument_ubl-8.2.1}/tests/2.4/common/UBL-SignatureBasicComponents-2.4.xsd +0 -0
  53. {trytond_edocument_ubl-8.2.0 → trytond_edocument_ubl-8.2.1}/tests/2.4/common/UBL-XAdES01903v132-201601-2.4.xsd +0 -0
  54. {trytond_edocument_ubl-8.2.0 → trytond_edocument_ubl-8.2.1}/tests/2.4/common/UBL-XAdES01903v141-201601-2.4.xsd +0 -0
  55. {trytond_edocument_ubl-8.2.0 → trytond_edocument_ubl-8.2.1}/tests/2.4/common/UBL-xmldsig-core-schema-2.4.xsd +0 -0
  56. {trytond_edocument_ubl-8.2.0 → trytond_edocument_ubl-8.2.1}/tests/2.4/common/UBL-xmldsig1-schema-2.4.xsd +0 -0
  57. {trytond_edocument_ubl-8.2.0 → trytond_edocument_ubl-8.2.1}/tests/2.4/common/UBL-xmldsig11-schema-2.4.xsd +0 -0
  58. {trytond_edocument_ubl-8.2.0 → trytond_edocument_ubl-8.2.1}/tests/2.4/maindoc/UBL-CreditNote-2.4.xsd +0 -0
  59. {trytond_edocument_ubl-8.2.0 → trytond_edocument_ubl-8.2.1}/tests/2.4/maindoc/UBL-Invoice-2.4.xsd +0 -0
  60. {trytond_edocument_ubl-8.2.0 → trytond_edocument_ubl-8.2.1}/tests/UBL-CreditNote-2.1-Example.xml +0 -0
  61. {trytond_edocument_ubl-8.2.0 → trytond_edocument_ubl-8.2.1}/tests/UBL-Invoice-2.1-Example-Trivial.xml +0 -0
  62. {trytond_edocument_ubl-8.2.0 → trytond_edocument_ubl-8.2.1}/tests/UBL-Invoice-2.1-Example.xml +0 -0
  63. {trytond_edocument_ubl-8.2.0 → trytond_edocument_ubl-8.2.1}/tests/__init__.py +0 -0
  64. {trytond_edocument_ubl-8.2.0 → trytond_edocument_ubl-8.2.1}/tests/scenario_ubl_2_credit_note_parse.json +0 -0
  65. {trytond_edocument_ubl-8.2.0 → trytond_edocument_ubl-8.2.1}/tests/scenario_ubl_2_credit_note_parse.rst +0 -0
  66. {trytond_edocument_ubl-8.2.0 → trytond_edocument_ubl-8.2.1}/tests/scenario_ubl_2_invoice_parse.json +0 -0
  67. {trytond_edocument_ubl-8.2.0 → trytond_edocument_ubl-8.2.1}/tests/scenario_ubl_2_invoice_parse.rst +0 -0
  68. {trytond_edocument_ubl-8.2.0 → trytond_edocument_ubl-8.2.1}/tests/scenario_ubl_2_invoice_parse_trivial.rst +0 -0
  69. {trytond_edocument_ubl-8.2.0 → trytond_edocument_ubl-8.2.1}/tests/test_module.py +0 -0
  70. {trytond_edocument_ubl-8.2.0 → trytond_edocument_ubl-8.2.1}/tests/test_scenario.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: trytond_edocument_ubl
3
- Version: 8.2.0
3
+ Version: 8.2.1
4
4
  Summary: UBL electronic document for Tryton
5
5
  Project-URL: homepage, https://www.tryton.org/
6
6
  Project-URL: documentation, https://docs.tryton.org/modules-edocument-ubl/
@@ -239,7 +239,7 @@ class Invoice(Model):
239
239
  base += line.base
240
240
  amount += line.amount
241
241
  tax_lines.append(TaxLine(base=base, amount=amount, tax=tax))
242
- yield group, tax_lines, amount
242
+ yield group, tax_lines, tax_amount
243
243
 
244
244
  def _taxes_key(self, line):
245
245
  return ()
@@ -413,21 +413,9 @@ class Invoice(Model):
413
413
  is not None)):
414
414
  invoice.cash_rounding = True
415
415
 
416
- if tax_exlusive_amount := root.findtext(
416
+ if tax_exclusive_amount := root.findtext(
417
417
  './{*}LegalMonetaryTotal/{*}TaxExclusiveAmount'):
418
- untaxed_amount = Decimal(tax_exlusive_amount)
419
-
420
- if allowance_total_amount := root.findtext(
421
- './{*}LegalMonetaryTotal/{*}AllowanceTotalAmount'):
422
- allowance_total_amount = Decimal(allowance_total_amount)
423
- untaxed_amount -= allowance_total_amount
424
-
425
- if charge_total_amount := root.findtext(
426
- './{*}LegalMonetaryTotal/{*}ChargeTotalAmount'):
427
- charge_total_amount = Decimal(charge_total_amount)
428
- untaxed_amount += charge_total_amount
429
-
430
- invoice.source_untaxed_amount = untaxed_amount
418
+ invoice.source_untaxed_amount = Decimal(tax_exclusive_amount)
431
419
 
432
420
  tax_amount = sum(Decimal(amount.text) for amount in root.iterfind(
433
421
  './{*}TaxTotal/{*}TaxAmount'))
@@ -738,21 +726,9 @@ class Invoice(Model):
738
726
  is not None):
739
727
  invoice.cash_rounding = True
740
728
 
741
- if tax_exlusive_amount := root.findtext(
729
+ if tax_exclusive_amount := root.findtext(
742
730
  './{*}LegalMonetaryTotal/{*}TaxExclusiveAmount'):
743
- untaxed_amount = Decimal(tax_exlusive_amount)
744
-
745
- if allowance_total_amount := root.findtext(
746
- './{*}LegalMonetaryTotal/{*}AllowanceTotalAmount'):
747
- allowance_total_amount = Decimal(allowance_total_amount)
748
- untaxed_amount -= allowance_total_amount
749
-
750
- if charge_total_amount := root.findtext(
751
- './{*}LegalMonetaryTotal/{*}ChargeTotalAmount'):
752
- charge_total_amount = Decimal(charge_total_amount)
753
- untaxed_amount += charge_total_amount
754
-
755
- invoice.source_untaxed_amount = -untaxed_amount
731
+ invoice.source_untaxed_amount = -Decimal(tax_exclusive_amount)
756
732
 
757
733
  tax_amount = sum(Decimal(amount.text) for amount in root.iterfind(
758
734
  './{*}TaxTotal/{*}TaxAmount'))
@@ -16,7 +16,9 @@ this repository contains the full copyright notices and license terms. -->
16
16
  </py:if>
17
17
  <cbc:ID>${this.invoice.number}</cbc:ID>
18
18
  <cbc:IssueDate>${this.invoice.invoice_date}</cbc:IssueDate>
19
- <cbc:DueDate>${max(l.maturity_date for l in this.invoice.lines_to_pay if l.maturity_date)}</cbc:DueDate>
19
+ <py:if test="specification != 'peppol-bis-3'">
20
+ <cbc:DueDate>${max(l.maturity_date for l in this.invoice.lines_to_pay if l.maturity_date)}</cbc:DueDate>
21
+ </py:if>
20
22
  <cbc:CreditNoteTypeCode>${this.type_code}</cbc:CreditNoteTypeCode>
21
23
  <cbc:DocumentCurrencyCode>${this.invoice.currency.code}</cbc:DocumentCurrencyCode>
22
24
  <cbc:BuyerReference py:if="this.invoice.reference">${this.invoice.reference}</cbc:BuyerReference>
@@ -1,5 +1,5 @@
1
1
  [tryton]
2
- version=8.2.0
2
+ version=8.2.1
3
3
  depends:
4
4
  edocument_unece
5
5
  ir