Ir al contenido
Menú
Se marcó esta pregunta
2 Respuestas
1034 Vistas

After importing my database backup (created in v18 and restored in a new installation of v18), I am receiving the following error when trying to add new customers (or open existing customers).  Could someone please point me in the right direction to repair this :)  Thank you so much for all your help so far!


Odoo Client Error

UncaughtPromiseError > EvalError

Uncaught Promise > Can not evaluate python expression: (bool(not is_coa_installed)) Error: Name 'is_coa_installed' is not defined

Occured on goneflying.au on 2025-05-31 17:18:11 GMT

EvalError: Can not evaluate python expression: (bool(not is_coa_installed))
    Error: Name 'is_coa_installed' is not defined
    EvalError: Can not evaluate python expression: (bool(not is_coa_installed))
    Error: Name 'is_coa_installed' is not defined
        at evaluateExpr (https://goneflying.au/web/assets/c2dc144/web.assets_web.min.js:3298:54)
        at evaluateBooleanExpr (https://goneflying.au/web/assets/c2dc144/web.assets_web.min.js:3301:8)
        at Proxy._isInvisible (https://goneflying.au/web/assets/c2dc144/web.assets_web.min.js:6202:97)
        at Proxy._checkValidity (https://goneflying.au/web/assets/c2dc144/web.assets_web.min.js:6161:197)
        at Proxy._applyChanges (https://goneflying.au/web/assets/c2dc144/web.assets_web.min.js:6157:177)
        at Proxy._update (https://goneflying.au/web/assets/c2dc144/web.assets_web.min.js:6272:24)
        at async https://goneflying.au/web/assets/c2dc144/web.assets_web.min.js:6151:40

Close

Avatar
Descartar

Also, did you actually run
python /path/to/odoo-bin --config=/path/to/odoo.conf -d name_of_your_database -u all
as described in https://www.odoo.com/forum/1/279428 ?

Autor Mejor respuesta

UPDATE - Solved!

SOLUTION


Thank you so much to all that have assisted me with this issue.  


Even though my backup.zip manifest said that the backup file was generated using Odoo v18.4a1, and trying this version to restore to, it didn't work. 


How did I resolve the issue?


I cloned the following git branch, and installed Odoo via this:

git clone https://github.com/odoo/odoo --depth 1 --branch saas-18.3 --single-branch


This installed version saas-18.3

Then I restored my database backup via the /web/database/manager URL


It restored with issues (yellow triangle was shown next to the database in the database selector), although it still allowed me to login. 


Next step was to activate the venv (virtual python environment) for my odoo installation and run the following repair command:

python3 odoo-bin --config=/etc/odoo.conf -d mydatabasenamehere -u all


This took a little time, but went through each of my modules, views etc and upgraded them all as was explained by you amazingly awesome people on this thread.


Now everything is perfect.


Thank you so so much for all your kind assistance!





Thank you so much for your response, this is very, very much appreciated!

I have just ran 

python3 odoo-bin --config=/etc/odoo.conf -d goneflying3 -u all

and in response:  (I am so sorry for being such a 'newbie' with this.  I also reloaded the fiscal settings for Australia).  I notice in the upgrade all response it has an error, something to do with partner.  I think we're close to solving it! *hopefully* <3

odoo@mail:~/odoo$ python3 odoo-bin --config=/etc/odoo.conf -d goneflying3 -u all
[...] ~~ trimmed for readability
2025-06-01 00:31:37,075 72534 WARNING ? odoo.tools.config: option addons_path, invalid addons directory '/opt/odoo/odoo-custom-addons', skipped
2025-06-01 00:31:37,075 72534 INFO ? odoo: Odoo version 18.4a1
2025-06-01 00:31:37,075 72534 INFO ? odoo: Using configuration file at /etc/odoo.conf
2025-06-01 00:31:37,076 72534 INFO ? odoo: addons paths: _NamespacePath(['/opt/odoo/odoo/odoo/addons', '/opt/odoo/.local/share/Odoo/addons/18.4', '/opt/odoo/odoo/addons'])
[...] ~~ trimmed for readability
2025-06-01 00:31:37,421 72534 INFO ? odoo.service.server: HTTP service (werkzeug) running on mail.labworx.au:8069
2025-06-01 00:31:37,433 72534 INFO goneflying3 odoo.modules.loading: loading 1 modules...
2025-06-01 00:31:37,433 72534 INFO goneflying3 odoo.modules.loading: Loading module base (1/1)
2025-06-01 00:31:37,450 72534 INFO goneflying3 odoo.registry: module base: creating or updating database tables
[...] ~~ trimmed for readability
2025-06-01 00:31:54,666 72534 INFO goneflying3 odoo.modules.loading: Loading module account (52/111)
2025-06-01 00:31:54,849 72534 INFO goneflying3 odoo.registry: module account: creating or updating database tables
[...] ~~ trimmed for readability
2025-06-01 00:31:56,657 72534 INFO goneflying3 odoo.modules.loading: loading account/views/partner_view.xml
2025-06-01 00:31:56,688 72534 WARNING goneflying3 odoo.modules.loading: Transient module states were reset
2025-06-01 00:31:56,691 72534 ERROR goneflying3 odoo.registry: Failed to load registry
2025-06-01 00:31:56,691 72534 CRITICAL goneflying3 odoo.service.server: Failed to initialize database `goneflying3`.
Traceback (most recent call last):
  File "/opt/odoo/odoo/odoo/service/server.py", line 1392, in preload_registries
    registry = Registry.new(dbname, update_module=update_module, install_modules=config['init'], upgrade_modules=config['update'])
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/decorator.py", line 232, in fun
    return caller(func, *(extras + args), **kw)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/odoo/odoo/odoo/tools/func.py", line 89, in locked
    return func(inst, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/odoo/odoo/odoo/orm/registry.py", line 166, in new
    load_modules(
  File "/opt/odoo/odoo/odoo/modules/loading.py", line 450, in load_modules
    load_module_graph(
  File "/opt/odoo/odoo/odoo/modules/loading.py", line 226, in load_module_graph
    load_data(env, idref, 'update', kind='data', package=package)
  File "/opt/odoo/odoo/odoo/modules/loading.py", line 79, in load_data
    tools.convert_file(env, package.name, filename, idref, mode, noupdate, kind)
  File "/opt/odoo/odoo/odoo/tools/convert.py", line 621, in convert_file
    convert_xml_import(env, module, fp, idref, mode, noupdate)
  File "/opt/odoo/odoo/odoo/tools/convert.py", line 702, in convert_xml_import
    obj.parse(doc.getroot())
  File "/opt/odoo/odoo/odoo/tools/convert.py", line 607, in parse
    self._tag_root(de)
  File "/opt/odoo/odoo/odoo/tools/convert.py", line 550, in _tag_root
    f(rec)
  File "/opt/odoo/odoo/odoo/tools/convert.py", line 561, in _tag_root
    raise ParseError(msg) from None  # Restart with "--log-handler odoo.tools.convert:DEBUG" for complete traceback
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
odoo.tools.convert.ParseError: while parsing /opt/odoo/odoo/addons/account/views/partner_view.xml:130
Error while validating view near:

<form string="Partners" __validate__="1">
                <div class="alert alert-warning oe_edit_only" role="alert" name="warning_tax" invisible="not same_vat_partner_id and not same_company
_registry_partner_id">
                    Potential duplicates:

<b>Access Rights Inconsistency</b><br/>This view may not work for all users: some users may have a combination of groups where the elements <b><tt>&l
t;field name=&#34;property_account_payable_id&#34;/&gt;</tt></b> are displayed, but they depend on the field <b><tt>is_coa_installed</tt></b> that is
not accessible. You might fix this by modifying user groups to make sure that all users who have access to those elements also have access to the fi
eld, typically via group implications. Alternatively, you could adjust the “<i>groups</i>” or “<i>invisible</i>” attributes for these fields, to make
sure they are always available together.<br/>Debugging information:<br/>- field “is_coa_installed” does not exist in model “res.partner”.<br/>- elem
ent “&lt;field name=&#34;property_account_payable_id&#34; required=&#34;is_coa_installed&#34; invisible=&#34;not is_coa_installed&#34;/&gt;” is shown
in the view for groups: &#39;account.group_account_readonly&#39; | &#39;account.group_account_invoice&#39;

View error context:
{'file': '/opt/odoo/odoo/addons/account/views/partner_view.xml',
'line': 1,
'name': 'partner.view.buttons',
'view': ir.ui.view(2842,),
'view.model': 'res.partner',
'view.parent': ir.ui.view(126,),
'xmlid': 'partner_view_buttons'}

2025-06-01 00:31:58,954 72534 INFO ? odoo.modules.loading: loading 1 modules...
2025-06-01 00:31:58,958 72534 INFO ? odoo.modules.loading: 1 modules loaded in 0.00s, 0 queries (+0 extra)
2025-06-01 00:31:58,960 72534 INFO ? odoo.modules.loading: loading 111 modules...
2025-06-01 00:31:59,112 72534 INFO ? odoo.modules.loading: 111 modules loaded in 0.15s, 0 queries (+0 extra)
2025-06-01 00:31:59,354 72534 INFO ? odoo.modules.loading: Modules loaded.
2025-06-01 00:31:59,361 72534 WARNING ? odoo.schema: Missing not-null constraint on res.partner.autopost_bills
[...] ~~ trimmed for readability
2025-06-01 00:31:59,399 72534 INFO goneflying3 werkzeug: 124.180.181.139 - - [01/Jun/2025 00:31:59] "GET /websocket?version=saas-18.3-4 HTTP/1.1" 400
- 21 0.009 0.440
2025-06-01 00:32:01,081 72534 INFO goneflying3 werkzeug: 124.180.181.139 - - [01/Jun/2025 00:32:01] "GET /websocket?version=saas-18.3-4 HTTP/1.1" 400
- 1 0.000 0.001
Avatar
Descartar

You're running source that is definitely not the same as from your initial backup - or, source that was never actually applied on your database as suggested by the addons path '/opt/odoo/.local/share/Odoo/addons/18.4'.
Apparently you've pulled master from https://github.com/odoo/odoo - this branch indeed does not contain is_coa_installed on res.partner anymore (compare https://github.com/odoo/odoo/blob/saas-18.3/addons/account/models/partner.py#L606 for example with https://github.com/odoo/odoo/blob/master/addons/account/models/partner.py).
Your original source was probably either https://github.com/odoo/odoo/tree/18.0 or https://github.com/odoo/odoo/tree/saas-18.3.
Upgrades between versions are a whole different story, so you should try to find the source that is actually matching your database (you probably just want to checkout saas-18.3 or download the zip from github and extract it and run upgrade all again; if it doesn't work you may go step by step down the versions (saas-18.2, saas-18.1, 18.0)).

Autor

Thank you Christoph. I have extracted the .zip backup file I created of my database, this is the contents of the manifest file in that backup zip:

{
"odoo_dump": "1",
"db_name": "goneflying",
"version": "18.4a1",
"version_info": [
18,
4,
0,
"alpha",
1,
""
],
"major_version": "18.4",
"pg_version": "16.0",
"modules": {
"product": "18.4.1.2",
"website_blog": "18.4.1.1",
"bus": "18.4.1.0",
"iap_mail": "18.4.1.0",
"auth_totp_mail": "18.4.1.0",
"rating": "18.4.1.1",
"website_slides": "18.4.2.7",
"auth_signup": "18.4.1.0",
"account_edi_ubl_cii": "18.4.1.0",
"base_setup": "18.4.1.0",
"account_payment": "18.4.2.0",
"web": "18.4.1.0",
"account": "18.4.1.4",
"project": "18.4.1.3",
"project_sms": "18.4.1.0",
"payment": "18.4.2.0",
"portal": "18.4.1.0",
"project_account": "18.4.1.0",
"base": "18.4.1.3",
"phone_validation": "18.4.2.1",
"base_import_module": "18.4.1.0",
"mail": "18.4.1.19",
"theme_default": "18.4.1.0",
"website_event": "18.4.1.4",
"website_sms": "18.4.1.0",
"website_profile": "18.4.1.0",
"privacy_lookup": "18.4.1.0",
"payment_paypal": "18.4.2.0",
"google_recaptcha": "18.4.1.0",
"auth_totp_portal": "18.4.1.0",
"resource": "18.4.1.1",
"http_routing": "18.4.1.0",
"barcodes": "18.4.2.0",
"contacts": "18.4.1.0",
"analytic": "18.4.1.2",
"iap": "18.4.1.1",
"event_product": "18.4.1.0",
"website": "18.4.1.0",
"partner_autocomplete": "18.4.1.1",
"resource_mail": "18.4.1.0",
"snailmail": "18.4.0.4",
"mail_bot": "18.4.1.2",
"mail_plugin": "18.4.1.0",
"base_install_request": "18.4.1.0",
"project_mail_plugin": "18.4.1.0",
"gamification": "18.4.1.0",
"portal_rating": "18.4.1.0",
"event_sms": "18.4.1.0",
"sms": "18.4.3.0",
"spreadsheet": "18.4.1.0",
"spreadsheet_dashboard": "18.4.1.0",
"spreadsheet_dashboard_account": "18.4.1.0",
"spreadsheet_account": "18.4.1.0",
"utm": "18.4.1.1",
"base_import": "18.4.2.0",
"web_tour": "18.4.1.0",
"uom": "18.4.1.0",
"l10n_au": "18.4.1.1",
"web_editor": "18.4.1.0",
"web_unsplash": "18.4.1.1",
"html_editor": "18.4.1.0",
"event": "18.4.1.9",
"rpc": "18.4.1.0",
"digest": "18.4.1.1",
"project_todo": "18.4.1.0",
"website_mail": "18.4.0.1",
"onboarding": "18.4.1.2",
"payment_custom": "18.4.2.0",
"payment_stripe": "18.4.2.0",
"website_payment": "18.4.1.0",
"sales_team": "18.4.1.1",
"snailmail_account": "18.4.0.1",
"social_media": "18.4.0.1",
"website_partner": "18.4.0.1",
"website_project": "18.4.1.0",
"auth_totp": "18.4.1.0"
}
}

Autor

I'm just installing ubuntu in a virtual machine locally, going to follow the installation guide I originally used again, and restore the db into it and check if it works

Mejor respuesta

coa stands for Chart of Accounts.

is_coa_installed is defined in the module Invoicing (account)

is_coa_installed = fields.Boolean(store=False, default=lambda partner: bool(partner.env.company.chart_template))


You should try upgrading it, either from the UI or via

python /path/to/odoo-bin --config=/path/to/odoo.conf -d name_of_your_database -u account


Chances are that you then also have to define your Chart of Accounts in Settings -> Invoicing (or Accounting) -> Section Fiscal Localization --> Fiscal Localization Package

Now, it should be mentioned that the module account is a quite basic one and you would usually end up to having it installed manually - or as a dependency - quite early one in any setup process (yet, it is certainly not required for everything).

That being said and given the fact that your setup complains about it now could also mean that you have a 3rd-party module installed that checks for this field but does not actually have a proper dependency on account in its manifest file (see for example https://www.odoo.com/documentation/18.0/developer/reference/backend/module.html).

Avatar
Descartar