Thai Localization - Account Vendor Tax Invoice
l10n_th_vendor_tax_invoice · OCA/l10n-thailand
-
Security10/251 grave, 0 minor
-
Activity0/25Last human commit 72 months ago
-
Required by20/253 modules depend on it
-
Maturity5/25In 1 Odoo series since 12.0
Heuristic over the facts below, not an audit · How it's computed
Security warnings
access_account_payment_tax— ACL grants write/create/unlink on 'model_account_payment_tax' to every user (portal/public included): no group is set. Verify record rules and test access as an unrelated public/portal user. acl-global-write · source
Found by automated static analysis: these patterns are usually risky, but only a manual review of the module can confirm a real issue. Methodology
Migration considerations
AccountInvoice— Migrating to 13.0: `@api.multi`/`@api.one` were removed (multi is the default): drop them, looping over `self` where `@api.one` was used. (1 methods) (2 occurrences in this file) migration-api-multi-one · sourceAccountMove— Migrating to 13.0: `@api.multi`/`@api.one` were removed (multi is the default): drop them, looping over `self` where `@api.one` was used. (2 methods) (2 occurrences in this file) migration-api-multi-one · sourceAccountPayment— Migrating to 13.0: `@api.multi`/`@api.one` were removed (multi is the default): drop them, looping over `self` where `@api.one` was used. (3 methods) (3 occurrences in this file) migration-api-multi-one · sourceTaxAdjustments— Migrating to 13.0: `@api.multi`/`@api.one` were removed (multi is the default): drop them, looping over `self` where `@api.one` was used. (2 methods) migration-api-multi-one · sourceview_account_payment_form— Migrating to 17.0: `attrs=`/`states=` are rejected in views: convert them to Python expressions in `invisible`/`readonly`/`required`, keeping the original AND/OR logic. migration-view-attrs-states · sourceview_tax_form_inherited— Migrating to 17.0: `attrs=`/`states=` are rejected in views: convert them to Python expressions in `invisible`/`readonly`/`required`, keeping the original AND/OR logic. migration-view-attrs-states · source- Raw `cr.execute()` INSERT/UPDATE/DELETE bypasses the ORM (no compute/constrains/tracking/mail): `update account_payment_tax pt set partner_id = (select partner_id from account_payment where id = pt.payment_id) where pt.partner_id is null` - re-check the table/column names still match after upgrading. migration-raw-sql-write · source
- Raw `cr.execute()` INSERT/UPDATE/DELETE bypasses the ORM (no compute/constrains/tracking/mail): `delete from account_move_line where id in %s` - re-check the table/column names still match after upgrading. migration-raw-sql-write · source
Migration review checklist, not a compatibility verdict. "Migrating to X.0" applies once you upgrade to that version; "Since X.0" means this version already ignores or rejects that code. Methodology
Description
Dependencies
Code analysis
Extracted from the source by best-effort static analysis (no code is executed); details may be incomplete.
Views touched 7
| XML ID | Name | Model | Type | Status |
|---|---|---|---|---|
invoice_supplier_form |
invoice.supplier.form | account.invoice | form | Inherits account.invoice_supplier_form |
tax_adjustments_wizard |
tax.adjustments.wizard.form | tax.adjustments.wizard | form | Inherits account.tax_adjustments_wizard |
view_account_payment_form |
account.view.account.payment.form | account.payment | form | Inherits account.view_account_payment_form |
view_move_line_form |
view.move.line.form | account.move.line | form | Inherits account.view_move_line_form |
view_move_line_tax_audit_tree |
account.move.line.tax.audit.tree | account.move.line | tree | Inherits account.view_move_line_tax_audit_tree |
view_tax_form |
account.tax.form.inherit | account.tax | form | Inherits account.view_tax_form |
view_tax_form_inherited |
account.tax.form.inherited | account.tax | form | Inherits account.view_tax_form |
HTTP endpoints 0
No HTTP endpoints found for this module.
Models touched 11
-
pending_tax_cash_basis_entryBooleandefault=Falsehelp='If pending, payment will has button to clear tax cash basis' -
tax_line_idsOne2many → account.payment.taxcomodel_name='account.payment.tax'copy=Falseinverse_name='payment_id' -
taxinv_readyBooleancopy=Falsedefault=Falsehelp='Tax invoice number is ready for filling in,\nsystem will open tax table allow user to fill in'string='Tax Invoice Ready'
No public methods.
No new fields.
Public methods (1)-
action_invoice_open(self)@api.multi
-
move_line_idsOne2many → account.move.linecomodel_name='account.move.line'inverse_name='invoice_tax_line_id'readonly=Truestring='Journal Items' -
tax_dateDatecompute='_compute_tax_invoice' -
tax_date_manualDatecopy=False -
tax_invoiceCharcompute='_compute_tax_invoice'help='- case sales invoice/refund, use invoice number\n- case purchase invoice/refund, user will manually keyin\n' -
tax_invoice_manualCharcopy=Falsehelp="Used for purchase invoice, when vendor will provide number\nthis will always overwrite invoice's number"string='Tax Invoice Number'
No public methods.
No new fields.
Public methods (1)-
post(self, invoice=False)@api.multiDo not post when tax_invoice_manual is not ready
-
invoice_tax_line_idMany2one → account.invoice.taxcomodel_name='account.invoice.tax'copy=Trueondelete='restrict' -
payment_tax_line_idMany2one → account.payment.taxcomodel_name='account.payment.tax'copy=Trueondelete='restrict' -
tax_dateCharcompute='_compute_tax_invoice'store=True -
tax_date_manualDatecopy=True -
tax_invoiceCharcompute='_compute_tax_invoice'store=True -
tax_invoice_manualCharcopy=Truestring='Tax Invoice Number'
-
create(self, vals)@api.modelCreate payment tax line for clear undue vat
No new fields.
Public methods (1)-
create(self, vals)@api.modelCheck payment, if taxinv_ready is not checked, do not create tax cash basis entry invl_id
No new fields.
Public methods (2)-
clear_tax_cash_basis(self)@api.multi -
post(self)@api.multi
-
amount_taxMonetarycurrency_field='company_currency_id'readonly=Truerelated='move_line_id.balance'string='Tax Amount' -
company_currency_idMany2one → res.currencycomodel_name='res.currency'default=<expr> -
invoice_tax_line_idMany2one → account.invoice.taxcomodel_name='account.invoice.tax' -
move_idMany2one → account.movecomodel_name='account.move'readonly=Truerelated='move_line_id.move_id'string='Journal Entry' -
move_line_idMany2one → account.move.linecomodel_name='account.move.line'compute='_compute_move_line_id'help='Journal Item that refer to this tax amount'string='Journal Item' -
nameCharstring='Tax Description' -
partner_idMany2one → res.partnercomodel_name='res.partner'required=True -
payment_idMany2one → account.paymentcomodel_name='account.payment'index=Truereadonly=True -
tax_date_manualDatehelp='Vendor provided tax invoice date'string='Tax Date' -
tax_invoice_manualCharhelp='Vendor provided tax invoice number'string='Tax Invoice Number'
-
init(self)@api.model_cr
-
sequence_number_nextIntegercompute='_compute_seq_number_next'help='The next sequence number will be used for the next tax invoice.'inverse='_inverse_seq_number_next'string='Next Number' -
taxinv_sequence_idMany2one → ir.sequencecomodel_name='ir.sequence'copy=Falsehelp='Optional sequence as Tax Invoice number'string='Tax Invoice Sequence'
No public methods.
No new fields.
Public methods (0)No public methods.
-
amount_tax_baseMonetarycurrency_field='company_currency_id'required=Truestring='Tax Base' -
credit_partner_idMany2one → res.partnercomodel_name='res.partner'string='Partner (Credit Account)' -
debit_partner_idMany2one → res.partnercomodel_name='res.partner'string='Partner (Debit Account)' -
tax_dateDate -
tax_invoiceCharstring='Tax Invoice Number'
No public methods.