OCA/l10n-thailand

Withholding Tax ERROR [field Effective date does not exist]

Closed this issue · 6 comments

I tried to install withholding tax related module but i'm stuck with these error ValueError Effective date does not exist
Do i need to add anything to the code ?
edit : i forgot to mention that i tried these module in version 13.0
Error:
Odoo Server Error

Traceback (most recent call last):
File "/odoo/odoo-server/odoo/addons/base/models/ir_ui_view.py", line 394, in _check_xml
self.postprocess_and_fields(view.model, view_doc, view.id)
File "/odoo/odoo-server/odoo/addons/base/models/ir_ui_view.py", line 994, in postprocess_and_fields
self.raise_view_error(message, view_id)
File "/odoo/odoo-server/odoo/addons/base/models/ir_ui_view.py", line 614, in raise_view_error
raise ValueError(message)
ValueError: Field effective_date does not exist

Error context:
View account.view.account.payment.form
[view_id: 1183, xml_id: n/a, model: account.payment, parent_id: 509]

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/odoo/odoo-server/odoo/tools/convert.py", line 712, in parse
self._tag_root(de)
File "/odoo/odoo-server/odoo/tools/convert.py", line 674, in _tag_root
f(rec)
File "/odoo/odoo-server/odoo/tools/convert.py", line 577, in _tag_record
record = model._load_records([data], self.mode == 'update')
File "/odoo/odoo-server/odoo/models.py", line 4168, in _load_records
records = self._load_records_create([data['values'] for data in to_create])
File "/odoo/odoo-server/odoo/models.py", line 4082, in _load_records_create
return self.create(values)
File "", line 2, in create
File "/odoo/odoo-server/odoo/api.py", line 336, in _model_create_multi
return create(self, arg)
File "/odoo/odoo-server/odoo/addons/base/models/ir_ui_view.py", line 475, in create
return super(View, self).create(vals_list)
File "", line 2, in create
File "/odoo/odoo-server/odoo/api.py", line 336, in _model_create_multi
return create(self, arg)
File "/odoo/odoo-server/odoo/models.py", line 3843, in create
fields[0].determine_inverse(batch_recs)
File "/odoo/odoo-server/odoo/fields.py", line 1122, in determine_inverse
getattr(records, self.inverse)()
File "/odoo/odoo-server/odoo/addons/base/models/ir_ui_view.py", line 299, in _inverse_arch
view.write(data)
File "/odoo/odoo-server/odoo/addons/base/models/ir_ui_view.py", line 493, in write
res = super(View, self).write(self._compute_defaults(vals))
File "/odoo/odoo-server/odoo/models.py", line 3632, in write
real_recs._validate_fields(vals, inverse_fields)
File "/odoo/odoo-server/odoo/models.py", line 1206, in _validate_fields
check(self)
File "/odoo/odoo-server/odoo/addons/base/models/ir_ui_view.py", line 396, in check_xml
raise ValidationError("%s\n\n%s" % (
("Error while validating view"), tools.ustr(e)))
odoo.exceptions.ValidationError: ('Error while validating view\n\nField effective_date does not exist\n\nError context:\nView account.view.account.payment.form\n[view_id: 1183, xml_id: n/a, model: account.payment, parent_id: 509]', None)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/odoo/odoo-server/odoo/http.py", line 624, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/odoo/odoo-server/odoo/http.py", line 310, in _handle_exception
raise pycompat.reraise(type(exception), exception, sys.exc_info()[2])
File "/odoo/odoo-server/odoo/tools/pycompat.py", line 14, in reraise
raise value
File "/odoo/odoo-server/odoo/http.py", line 669, in dispatch
result = self._call_function(**self.params)
File "/odoo/odoo-server/odoo/http.py", line 350, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/odoo/odoo-server/odoo/service/model.py", line 94, in wrapper
return f(dbname, *args, **kwargs)
File "/odoo/odoo-server/odoo/http.py", line 339, in checked_call
result = self.endpoint(*a, **kw)
File "/odoo/odoo-server/odoo/http.py", line 915, in call
return self.method(*args, **kw)
File "/odoo/odoo-server/odoo/http.py", line 515, in response_wrap
response = f(*args, **kw)
File "/odoo/odoo-server/addons/web/controllers/main.py", line 1331, in call_button
action = self._call_kw(model, method, args, kwargs)
File "/odoo/odoo-server/addons/web/controllers/main.py", line 1319, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "/odoo/odoo-server/odoo/api.py", line 387, in call_kw
result = _call_kw_multi(method, model, args, kwargs)
File "/odoo/odoo-server/odoo/api.py", line 374, in _call_kw_multi
result = method(recs, *args, **kwargs)
File "", line 2, in button_immediate_install
File "/odoo/odoo-server/odoo/addons/base/models/ir_module.py", line 72, in check_and_log
return method(self, *args, **kwargs)
File "/odoo/odoo-server/odoo/addons/base/models/ir_module.py", line 463, in button_immediate_install
return self._button_immediate_function(type(self).button_install)
File "/odoo/odoo-server/odoo/addons/base/models/ir_module.py", line 573, in _button_immediate_function
modules.registry.Registry.new(self._cr.dbname, update_module=True)
File "/odoo/odoo-server/odoo/modules/registry.py", line 86, in new
odoo.modules.load_modules(registry._db, force_demo, status, update_module)
File "/odoo/odoo-server/odoo/modules/loading.py", line 421, in load_modules
processed_modules += load_marked_modules(cr, graph,
File "/odoo/odoo-server/odoo/modules/loading.py", line 313, in load_marked_modules
loaded, processed = load_module_graph(
File "/odoo/odoo-server/odoo/modules/loading.py", line 225, in load_module_graph
load_data(cr, idref, mode, kind='data', package=package, report=report)
File "/odoo/odoo-server/odoo/modules/loading.py", line 68, in load_data
tools.convert_file(cr, package.name, filename, idref, mode, noupdate, kind, report)
File "/odoo/odoo-server/odoo/tools/convert.py", line 736, in convert_file
convert_xml_import(cr, module, fp, idref, mode, noupdate, report)
File "/odoo/odoo-server/odoo/tools/convert.py", line 803, in convert_xml_import
obj.parse(doc.getroot())
File "/odoo/odoo-server/odoo/tools/convert.py", line 715, in parse
pycompat.reraise(
File "/odoo/odoo-server/odoo/tools/pycompat.py", line 13, in reraise
raise value.with_traceback(tb)
File "/odoo/odoo-server/odoo/tools/convert.py", line 712, in parse
self._tag_root(de)
File "/odoo/odoo-server/odoo/tools/convert.py", line 674, in _tag_root
f(rec)
File "/odoo/odoo-server/odoo/tools/convert.py", line 577, in _tag_record
record = model._load_records([data], self.mode == 'update')
File "/odoo/odoo-server/odoo/models.py", line 4168, in _load_records
records = self._load_records_create([data['values'] for data in to_create])
File "/odoo/odoo-server/odoo/models.py", line 4082, in _load_records_create
return self.create(values)
File "", line 2, in create
File "/odoo/odoo-server/odoo/api.py", line 336, in _model_create_multi
return create(self, arg)
File "/odoo/odoo-server/odoo/addons/base/models/ir_ui_view.py", line 475, in create
return super(View, self).create(vals_list)
File "", line 2, in create
File "/odoo/odoo-server/odoo/api.py", line 336, in _model_create_multi
return create(self, arg)
File "/odoo/odoo-server/odoo/models.py", line 3843, in create
fields[0].determine_inverse(batch_recs)
File "/odoo/odoo-server/odoo/fields.py", line 1122, in determine_inverse
getattr(records, self.inverse)()
File "/odoo/odoo-server/odoo/addons/base/models/ir_ui_view.py", line 299, in _inverse_arch
view.write(data)
File "/odoo/odoo-server/odoo/addons/base/models/ir_ui_view.py", line 493, in write
res = super(View, self).write(self._compute_defaults(vals))
File "/odoo/odoo-server/odoo/models.py", line 3632, in write
real_recs._validate_fields(vals, inverse_fields)
File "/odoo/odoo-server/odoo/models.py", line 1206, in _validate_fields
check(self)
File "/odoo/odoo-server/odoo/addons/base/models/ir_ui_view.py", line 396, in check_xml
raise ValidationError("%s\n\n%s" % (
("Error while validating view"), tools.ustr(e)))
odoo.tools.convert.ParseError: "Error while validating view

Field effective_date does not exist

Error context:
View account.view.account.payment.form
[view_id: 1183, xml_id: n/a, model: account.payment, parent_id: 509]
None" while parsing /odoo/odoo-server/addons/l10n-thailand/l10n_th_tax_invoice/views/account_payment_view.xml:2, near


account.view.account.payment.form
account.payment


primary





























I tried these module on version 13.0 on odoo 13 sir

yes i just install odoo 13 via yenthe666 installation script
after that i install om_account v13 and clone git to the addon path. next i tried to install all other dependencies module such as date_range, xlsx_report. then i got stuck with withhholding tax and tax_invoice module that declare similar error on effective date field sir

edit
These error happen when i just tried to install them

Update for now

I tried to create new fresh database and install all module before i install any other app. No error shown this time.
If i found other issue i will update again

Thank you for report your finding. Good luck Odooing!