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

[17.0] [MIG] base_vat_panama #36

Merged
merged 3 commits into from
Nov 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
73 changes: 73 additions & 0 deletions base_vat_panama/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
==============
Panamanian VAT
==============

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:23ced28a7a4763d388d79e34b95ed8c1943e271cbad26993977b4d01acc2bb27
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/licence-LGPL--3-blue.png
:target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html
:alt: License: LGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-it--projects--llc%2Ftg--addons-lightgray.png?logo=github
:target: https://github.com/it-projects-llc/tg-addons/tree/17.0/base_vat_panama
:alt: it-projects-llc/tg-addons

|badge1| |badge2| |badge3|

Customizes VAT check according to Panama rules

Allows to proceed any TIN/RUC numbers as soon as they start with 'RUC'

**Table of contents**

.. contents::
:local:

Usage
=====

- Open any Partner Form
- Click ``[Edit]``
- Update **VAT** field with any string starts with 'RUC'
- Click ``[Save]``
- Result: **VAT** Number is saved

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/it-projects-llc/tg-addons/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/it-projects-llc/tg-addons/issues/new?body=module:%20base_vat_panama%0Aversion:%2017.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Do not contact contributors directly about support or help with technical issues.

Credits
=======

Authors
-------

* IT-Projects LLC

Contributors
------------

- Alexandr Kolushov (https://github.com/KolushovAlexandr)
- Victor Bykov (https://github.com/BykovVik)
- Eugene Molotov (https://github.com/em230418)

Maintainers
-----------

This module is part of the `it-projects-llc/tg-addons <https://github.com/it-projects-llc/tg-addons/tree/17.0/base_vat_panama>`_ project on GitHub.

You are welcome to contribute.
3 changes: 3 additions & 0 deletions base_vat_panama/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html).

from . import models
15 changes: 15 additions & 0 deletions base_vat_panama/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"name": """Panamanian VAT""",
"summary": """Customizes VAT check according to Panama rules""",
"category": "Accounting",
"version": "17.0.1.2.1",
"author": "IT-Projects LLC",
"support": "[email protected]",
"website": "https://github.com/it-projects-llc/tg-addons",
"license": "LGPL-3",
"depends": [
"base_vat",
],
"data": ["views/partner_views.xml"],
"demo": [],
}
3 changes: 3 additions & 0 deletions base_vat_panama/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html).

from . import models
25 changes: 25 additions & 0 deletions base_vat_panama/models/models.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Copyright 2019 Kolushov Alexandr <https://it-projects.info/team/KolushovAlexandr>
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html).

from odoo import api, fields, models


class ResPartner(models.Model):
_inherit = "res.partner"

ruc_vat_panama = fields.Char("RUC")
dv_vat_panama = fields.Char("DV")

def _split_vat(self, vat):
vat_country = vat[:3].lower()
# Panamanian VaT numbers start with 'RUC'
if vat_country == "ruc":
return "pacustom", vat
return super()._split_vat(vat)

def check_vat_pacustom(self, vat):
return True

@api.model
def simple_vat_check(self, country_code, vat_number):
return True
3 changes: 3 additions & 0 deletions base_vat_panama/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["whool"]
build-backend = "whool.buildapi"
3 changes: 3 additions & 0 deletions base_vat_panama/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- Alexandr Kolushov (https://github.com/KolushovAlexandr)
- Victor Bykov (https://github.com/BykovVik)
- Eugene Molotov (https://github.com/em230418)
3 changes: 3 additions & 0 deletions base_vat_panama/readme/DESCRIPTION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Customizes VAT check according to Panama rules

Allows to proceed any TIN/RUC numbers as soon as they start with 'RUC'
5 changes: 5 additions & 0 deletions base_vat_panama/readme/USAGE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
* Open any Partner Form
* Click `[Edit]`
* Update **VAT** field with any string starts with 'RUC'
* Click `[Save]`
* Result: **VAT** Number is saved
Binary file added base_vat_panama/static/description/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading