| 1 |
# Part of Odoo. See LICENSE file for full copyright and licensing details. |
| 2 |
from odoo import fields, models |
| 3 |
|
| 4 |
CLASSIFICATION_CODES_LIST = [ |
| 5 |
("001", "(001) Breastfeeding equipment "), |
| 6 |
("002", "(002) Child care centres and kindergartens fees"), |
| 7 |
("003", "(003) Computer, smartphone or tablet"), |
| 8 |
("004", "(004) Consolidated e-Invoice "), |
| 9 |
( |
| 10 |
"005", |
| 11 |
"(005) Construction materials (as specified under Fourth Schedule of the Lembaga Pembangunan Industri Pembinaan Malaysia Act 1994)", |
| 12 |
), |
| 13 |
("006", "(006) Disbursement"), |
| 14 |
("007", "(007) Donation"), |
| 15 |
("008", "(008) -Commerce - e-Invoice to buyer / purchaser"), |
| 16 |
("009", "(009) e-Commerce - Self-billed e-Invoice to seller, logistics, etc. "), |
| 17 |
("010", "(010) Education fees"), |
| 18 |
("011", "(011) Goods on consignment (Consignor)"), |
| 19 |
("012", "(012) Goods on consignment (Consignee)"), |
| 20 |
("013", "(013) Gym membership"), |
| 21 |
("014", "(014) Insurance - Education and medical benefits"), |
| 22 |
("015", "(015) Insurance - Takaful or life insurance"), |
| 23 |
("016", "(016) Interest and financing expenses"), |
| 24 |
("017", "(017) Internet subscription"), |
| 25 |
("018", "(018) Land and building"), |
| 26 |
( |
| 27 |
"019", |
| 28 |
"(019) Medical examination for learning disabilities and early intervention or rehabilitation treatments of learning disabilities", |
| 29 |
), |
| 30 |
("020", "(020) Medical examination or vaccination expenses"), |
| 31 |
("021", "(021) Medical expenses for serious diseases"), |
| 32 |
("022", "(022) Others"), |
| 33 |
( |
| 34 |
"023", |
| 35 |
"(023) Petroleum operations (as defined in Petroleum (Income Tax) Act 1967)", |
| 36 |
), |
| 37 |
("024", "(024) Private retirement scheme or deferred annuity scheme"), |
| 38 |
("025", "(025) Motor vehicle"), |
| 39 |
( |
| 40 |
"026", |
| 41 |
"(026) Subscription of books / journals / magazines / newspapers / other similar publications", |
| 42 |
), |
| 43 |
("027", "(027) Reimbursement"), |
| 44 |
("028", "(028) Rental of motor vehicle"), |
| 45 |
( |
| 46 |
"029", |
| 47 |
"(029) EV charging facilities (Installation, rental, sale / purchase or subscription fees) ", |
| 48 |
), |
| 49 |
("030", "(030) Repair and maintenance"), |
| 50 |
("031", "(031) Research and development"), |
| 51 |
("032", "(032) Foreign income"), |
| 52 |
("033", "(033) Self-billed - Betting and gaming"), |
| 53 |
("034", "(034) Self-billed - Importation of goods"), |
| 54 |
("035", "(035) Self-billed - Importation of services"), |
| 55 |
("036", "(036) Self-billed - Others"), |
| 56 |
( |
| 57 |
"037", |
| 58 |
"(037) Self-billed - Monetary payment to agents, dealers or distributors", |
| 59 |
), |
| 60 |
( |
| 61 |
"038", |
| 62 |
"(038) Fees related to sports equipment, facility rentals, competition registration, and training imposed by registered sports organizations under the Sports Development Act 1997", |
| 63 |
), |
| 64 |
("039", "(039) Supporting equipment for disabled person"), |
| 65 |
("040", "(040) Voluntary contribution to approved provident fund "), |
| 66 |
("041", "(041) Dental examination or treatment"), |
| 67 |
("042", "(042) Fertility treatment"), |
| 68 |
( |
| 69 |
"043", |
| 70 |
"(043) Treatment and home care nursing, daycare centres and residential care centers", |
| 71 |
), |
| 72 |
("044", "(044) Vouchers, gift cards, loyalty points, etc"), |
| 73 |
( |
| 74 |
"045", |
| 75 |
"(045) Self-billed - Non-monetary payment to agents, dealers or distributors", |
| 76 |
), |
| 77 |
] |
| 78 |
|
| 79 |
|
| 80 |
class ProductTemplate(models.Model): |
| 81 |
""" |
| 82 |
These codes are required by the API. They represent the product classifications that are used in Malaysia. |
| 83 |
As defined in the list of codes allowed here: https://sdk.myinvois.hasil.gov.my/codes/classification-codes/ |
| 84 |
""" |
| 85 |
_inherit = "product.template" |
| 86 |
|
| 87 |
# ------------------ |
| 88 |
# Fields declaration |
| 89 |
# ------------------ |
| 90 |
|
| 91 |
l10n_my_edi_classification_code = fields.Selection( |
| 92 |
string="Malaysian classification code", |
| 93 |
selection=CLASSIFICATION_CODES_LIST, |
| 94 |
) |