Skip to content

Commit 5eb1ee2

Browse files
authored
Merge pull request #45 from ecosoft-odoo/14.0-add-skyviv_account
[14.0][add] skyviv account and skyvivi contacts
2 parents eb62e03 + e56e245 commit 5eb1ee2

File tree

10 files changed

+87
-1
lines changed

10 files changed

+87
-1
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
2+
3+
from . import models
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Copyright 2022 Ecosoft Co., Ltd. (http://ecosoft.co.th)
2+
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
3+
4+
{
5+
"name": "SKYVIV: Account",
6+
"summary": "Used to install related modules",
7+
"version": "14.0.1.0.0",
8+
"license": "AGPL-3",
9+
"category": "SKYVIV",
10+
"author": "Ecosoft",
11+
"installable": True,
12+
"depends": [
13+
"account",
14+
"l10n_th_account_tax",
15+
],
16+
"data": [
17+
"views/account_payment_views.xml",
18+
],
19+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
2+
3+
from . import account_payment
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Copyright 2022 Ecosoft Co., Ltd. (http://ecosoft.co.th)
2+
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
3+
4+
from odoo import fields, models
5+
6+
7+
class AccountMove(models.Model):
8+
_inherit = "account.payment"
9+
10+
clearing_advance = fields.Boolean()
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<odoo>
3+
<record id="view_account_payment_form" model="ir.ui.view">
4+
<field name="name">account.payment.form</field>
5+
<field name="model">account.payment</field>
6+
<field name="inherit_id" ref="l10n_th_account_tax.view_account_payment_form" />
7+
<field name="arch" type="xml">
8+
<field name="tax_invoice_move_ids" position="after">
9+
<field name="clearing_advance" />
10+
</field>
11+
</field>
12+
</record>
13+
</odoo>

odoo/custom/src/private/skyviv_account_asset_management/__manifest__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
33

44
{
5-
"name": "SKYVIV: Account",
5+
"name": "SKYVIV: Account Asset Management",
66
"summary": "Used to install related modules",
77
"version": "14.0.1.0.0",
88
"license": "AGPL-3",
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
2+
3+
from . import models
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Copyright 2022 Ecosoft Co., Ltd. (http://ecosoft.co.th)
2+
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
3+
4+
{
5+
"name": "SKYVIV: Contact",
6+
"summary": "Used to install related modules",
7+
"version": "14.0.1.0.0",
8+
"license": "AGPL-3",
9+
"category": "SKYVIV",
10+
"author": "Ecosoft",
11+
"installable": True,
12+
"depends": [
13+
"contacts",
14+
],
15+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from . import res_partner
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Copyright 2022 Ecosoft Co., Ltd. (http://ecosoft.co.th)
2+
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
3+
4+
from odoo import _, api, fields, models
5+
from odoo.exceptions import ValidationError
6+
7+
8+
class ResPartner(models.Model):
9+
_inherit = "res.partner"
10+
11+
vat = fields.Char(copy=False)
12+
13+
@api.constrains("vat")
14+
def _check_vat_length(self):
15+
for record in self:
16+
if record.vat and len(record.vat) != 13:
17+
raise ValidationError(
18+
_("Identification Number must have exactly 13 digits.")
19+
)

0 commit comments

Comments
 (0)