Skip to Content
Menu
This question has been flagged
3 Replies
2012 Views

The error is strange as the field (is_hon) is available in the model (account.analytic.account), and I'm also able to see the field under Setting>Technical>Database Structure>Fields for that object.

Important & strange: The view doesn't have the field is_hon, actually the field is added to some other inherited view.


Please let me know if any idea on this.

Thanks!


Please find the error log below,

File "/workspace/parts/odoo/odoo/models.py", line 1417, in fields_view_get
    xarch, xfields = View.postprocess_and_fields(self._name, etree.fromstring(result['arch']), view_id)
  File "/workspace/parts/odoo/odoo/addons/base/ir/ir_ui_view.py", line 919, in postprocess_and_fields
    self.raise_view_error(message, view_id)
  File "/workspace/parts/odoo/odoo/addons/base/ir/ir_ui_view.py", line 477, in raise_view_error
    raise ValueError(message)
ValueError: Field `is_hon` does not exist

Error context:
View `account.analytic.account.list`
[view_id: 369, xml_id: analytic.view_account_analytic_account_list, model: account.analytic.account, parent_id: n/a]
Avatar
Discard
Author

Hi @Niyas,

Indeed, whatever you told is true. Thanks!

Actually I've already found to which view the field has been added.

There are some inherited views and one base view for this object, this field is added in one of the inherited view but the error message shows the base view (different view). So this error looks bit strange as it shows different view in the error log. Also the field is available in model in python file.

As usual, the error pops up only in server and it works fine in my local machine.

Thanks once again!

Author Best Answer

Hi @Niyas, 

I've found the reason for the error, it's a careless mistake as many developers involved.

Reason: Change of git branch. (The new git branch doesn't have the module which is having the field)

Reason for the issue only in server: The branch updation is done only in server and not in local.

Reason for the field availability in UI: The field got created by old branch module, so it's still available while checking via UI (Settings>Technical>Database Structure>Fields)

Reason for the views availability in UI: The views got created by old branch module, so they're still available while checking via UI (Settings> Technical> User Interface> Views)

Thanks!!!

Avatar
Discard
Best Answer

Hi,

If you need to know to which view the Field has been added, you can easily find it from the integrated development like pycharm or vs code. If you need to find which view from the odoo user interface, activate the developer mode and Navigate to Settings -> Technical -> User Interface -> Views, and then search the missing field is_hon inside the View Architecture, once you enter is_hon at the last you can see the option to search inside the View Architecture.


Thanks

Avatar
Discard