This question has been flagged


Hey!

When trying to access `Sales` app I cannot do it and instead I get:

Traceback (most recent call last): File "/opt/bitnami/apps/odoo/lib/odoo-13.0.post20200815-py3.7.egg/odoo/tools/safe_eval.py", line 351, in safe_eval return unsafe_eval(c, globals_dict, locals_dict) File "", line 1, in <module> AttributeError: 'res.users' object has no attribute 'branch_id' During handling of the above exception, another exception occurred: 
...
... 
ValueError: <class 'AttributeError'>: "'res.users' object has no attribute 'branch_id'" while evaluating
"['|',('branch_id','=',False),('branch_id','=',user.branch_id.id),('user_id','=',user.id)]"

I had installed this module: https://apps.odoo.com/apps/modules/13.0/branch/ which i think is the culprit, but it is now uninstalled. Maybe it wasn't uninstalled properly? looks like the module's user module added some columns to the user's db table, and uninstallation didn't remove them?

thanks :)

Avatar
Discard

Hello Bernardo,

It is actually almost the opposite, there is a view that inherited the Sales App using a specific domain for users but now the field no longer exists in the database, an error is raised.

Does the error code supply a specific XML file where this error is occurring in the logs?

Thanks,

Author

thanks Jack. It doesn't state a XML file, nonetheless doing: `grep -inr --include \*.xml "user.branch_id.id" .` in my addons directory i got the view with the evaluation error: (which is under the aforementioned module's directory, which is weird because supposedly the module is uninstalled, therefore odoo should'nt read those files):

```

<record id="sale.sale_order_personal_rule" model="ir.rule">

<field name="name">Personal Orders</field>

<field ref="model_sale_order" name="model_id"/>

<field name="domain_force">['|',('branch_id','=',False),('branch_id','=',user.branch_id.id),('user_id','=',user.id)]</field>

<field name="groups" eval="[(4, ref('sales_team.group_sale_salesman'))]"/>

</record>

```

I've tried deleting the module's directoy on the modules path, but the problem persists, can you help?

Hello, 

Did you find a solution for this please?

better to connect the module author and ask for support as it is a 3rd party module