mirror of
https://github.com/bringout/oca-ocb-l10n_me-africa.git
synced 2026-04-27 18:22:05 +02:00
19.0 vanilla
This commit is contained in:
parent
c5006a6999
commit
80293571e7
420 changed files with 21812 additions and 44297 deletions
|
|
@ -10,37 +10,14 @@ pip install odoo-bringout-oca-ocb-l10n_mt_pos
|
|||
|
||||
## Dependencies
|
||||
|
||||
This addon depends on:
|
||||
- point_of_sale
|
||||
|
||||
## Manifest Information
|
||||
|
||||
- **Name**: Malta - Point of Sale
|
||||
- **Version**: 1.0
|
||||
- **Category**: Accounting/Localizations/Point of Sale
|
||||
- **License**: LGPL-3
|
||||
- **Installable**: False
|
||||
|
||||
## Source
|
||||
|
||||
Based on [OCA/OCB](https://github.com/OCA/OCB) branch 16.0, addon `l10n_mt_pos`.
|
||||
- Repository: https://github.com/OCA/OCB
|
||||
- Branch: 19.0
|
||||
- Path: addons/l10n_mt_pos
|
||||
|
||||
## License
|
||||
|
||||
This package maintains the original LGPL-3 license from the upstream Odoo project.
|
||||
|
||||
## Documentation
|
||||
|
||||
- Overview: doc/OVERVIEW.md
|
||||
- Architecture: doc/ARCHITECTURE.md
|
||||
- Models: doc/MODELS.md
|
||||
- Controllers: doc/CONTROLLERS.md
|
||||
- Wizards: doc/WIZARDS.md
|
||||
- Reports: doc/REPORTS.md
|
||||
- Security: doc/SECURITY.md
|
||||
- Install: doc/INSTALL.md
|
||||
- Usage: doc/USAGE.md
|
||||
- Configuration: doc/CONFIGURATION.md
|
||||
- Dependencies: doc/DEPENDENCIES.md
|
||||
- Troubleshooting: doc/TROUBLESHOOTING.md
|
||||
- FAQ: doc/FAQ.md
|
||||
This package preserves the original LGPL-3 license.
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
"version": "1.0",
|
||||
"category": "Accounting/Localizations/Point of Sale",
|
||||
"description": """Malta Compliance Letter for EXO Number""",
|
||||
"countries": ["mt"],
|
||||
"depends": [
|
||||
"point_of_sale",
|
||||
],
|
||||
|
|
@ -12,6 +13,8 @@
|
|||
'wizards/compliance_letter_view.xml',
|
||||
'reports/compliance_letter_report.xml',
|
||||
],
|
||||
"installable": True,
|
||||
"auto_install": True,
|
||||
"author": "Odoo S.A.",
|
||||
"license": "LGPL-3",
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
from odoo import models, fields, release, _
|
||||
from odoo import models, fields, release, tools, _
|
||||
from datetime import datetime
|
||||
from odoo.exceptions import UserError
|
||||
|
||||
|
|
@ -13,21 +13,20 @@ class ComplianceLetter(models.TransientModel):
|
|||
raise UserError(_("Compliance letters can only be created for companies registered in Malta. Please ensure the company's country is set to Malta."))
|
||||
|
||||
data = {
|
||||
"version": self.get_odoo_version(),
|
||||
"date": self.get_formatted_date(),
|
||||
"version": self._get_odoo_version(),
|
||||
"date": self._get_formatted_date(),
|
||||
"name": self.company_id.name,
|
||||
"vat": self.company_id.vat,
|
||||
"address": self.company_id.partner_id.contact_address,
|
||||
"address": self.company_id.partner_id.pos_contact_address,
|
||||
}
|
||||
return self.env.ref('l10n_mt_pos.report_compliance_letter').report_action([], data=data)
|
||||
|
||||
def get_formatted_date(self):
|
||||
def _get_formatted_date(self):
|
||||
"""Returns the formatted date as 'Date (Month, xxth, 20XX)'."""
|
||||
date_obj = datetime.strptime(str(fields.Date.today()), '%Y-%m-%d')
|
||||
day = date_obj.day
|
||||
day_suffix = 'th' if 11 <= day <= 13 else {1: 'st', 2: 'nd', 3: 'rd'}.get(day % 10, 'th')
|
||||
formatted_date = date_obj.strftime(f"%B {day}{day_suffix}, %Y")
|
||||
return formatted_date
|
||||
return tools.format_date(self.env, date_obj, date_format=f"MMMM d'{day_suffix}', Y")
|
||||
|
||||
def get_odoo_version(self):
|
||||
def _get_odoo_version(self):
|
||||
return release.major_version
|
||||
|
|
|
|||
|
|
@ -19,7 +19,8 @@
|
|||
<field name="view_mode">form</field>
|
||||
<field name="target">new</field>
|
||||
</record>
|
||||
<menuitem id="pos_mt_statements_menu" name="Malta EXO" parent="point_of_sale.menu_point_rep" sequence="6" />
|
||||
<menuitem id="menu_compliance_letter" name="Compliance Letter"
|
||||
action="l10n_mt_pos.action_generate_compliance_letter"
|
||||
parent="point_of_sale.menu_point_rep" sequence="6"/>
|
||||
parent="l10n_mt_pos.pos_mt_statements_menu" sequence="10"/>
|
||||
</odoo>
|
||||
|
|
|
|||
|
|
@ -1,12 +1,14 @@
|
|||
[project]
|
||||
name = "odoo-bringout-oca-ocb-l10n_mt_pos"
|
||||
version = "16.0.0"
|
||||
description = "Malta - Point of Sale - Odoo addon"
|
||||
description = "Malta - Point of Sale -
|
||||
Odoo addon
|
||||
"
|
||||
authors = [
|
||||
{ name = "Ernad Husremovic", email = "hernad@bring.out.ba" }
|
||||
]
|
||||
dependencies = [
|
||||
"odoo-bringout-oca-ocb-point_of_sale>=16.0.0",
|
||||
"odoo-bringout-oca-ocb-point_of_sale>=19.0.0",
|
||||
"requests>=2.25.1"
|
||||
]
|
||||
readme = "README.md"
|
||||
|
|
@ -16,7 +18,7 @@ classifiers = [
|
|||
"Intended Audience :: Developers",
|
||||
"License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)",
|
||||
"Programming Language :: Python :: 3",
|
||||
"Programming Language :: Python :: 3.11",
|
||||
"Programming Language :: Python :: 3.11",
|
||||
"Programming Language :: Python :: 3.12",
|
||||
"Topic :: Office/Business",
|
||||
]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue