Purchases Product Invalid Field Message Followers

Bug #1101318 reported by Carlos Pueyo
42
This bug affects 7 people
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Fix Released
Medium
OpenERP Publisher's Warranty Team

Bug Description

Windows 7 Pro x64 (Firefox 18)
OpenERP V 7.0-20130118-002240

How to reproduce:

In a clean database:
- Install module product
- Install module account_followup
- Install module purchase
- Activate multiple companies
- Create a user
- Create a group
- Add in herency all groups
- Put user and admin in the group
- Enter with the user
- Purchases -> Product -> Kanban view

OpenERP Server Error
Client Traceback (most recent call last):
  File "C:\Program Files (x86)\OpenERP\Server\server\openerp\addons\web\http.py", line 195, in dispatch
  File "C:\Program Files (x86)\OpenERP\Server\server\openerp\addons\web\controllers\main.py", line 1004, in search_read
  File "C:\Program Files (x86)\OpenERP\Server\server\openerp\addons\web\controllers\main.py", line 1039, in do_search_read
  File "C:\Program Files (x86)\OpenERP\Server\server\openerp\addons\web\session.py", line 43, in proxy
  File "C:\Program Files (x86)\OpenERP\Server\server\openerp\addons\web\session.py", line 31, in proxy_method
  File "C:\Program Files (x86)\OpenERP\Server\server\openerp\addons\web\session.py", line 104, in send

Server Traceback (most recent call last):
  File "C:\Program Files (x86)\OpenERP\Server\server\openerp\addons\web\session.py", line 90, in send
  File "C:\Program Files (x86)\OpenERP\Server\server\.\openerp\netsvc.py", line 289, in dispatch_rpc
  File "C:\Program Files (x86)\OpenERP\Server\server\.\openerp\service\web_services.py", line 614, in dispatch
  File "C:\Program Files (x86)\OpenERP\Server\server\.\openerp\osv\osv.py", line 169, in execute_kw
  File "C:\Program Files (x86)\OpenERP\Server\server\.\openerp\osv\osv.py", line 123, in wrapper
  File "C:\Program Files (x86)\OpenERP\Server\server\.\openerp\osv\osv.py", line 179, in execute
  File "C:\Program Files (x86)\OpenERP\Server\server\openerp\addons\audittrail\audittrail.py", line 514, in execute_cr
  File "C:\Program Files (x86)\OpenERP\Server\server\.\openerp\osv\osv.py", line 166, in execute_cr
  File "C:\Program Files (x86)\OpenERP\Server\server\.\openerp\osv\orm.py", line 3606, in read
  File "C:\Program Files (x86)\OpenERP\Server\server\.\openerp\osv\orm.py", line 3714, in _read_flat
  File "C:\Program Files (x86)\OpenERP\Server\server\.\openerp\osv\fields.py", line 1131, in get
  File "C:\Program Files (x86)\OpenERP\Server\server\openerp\addons\stock\product.py", line 36, in _stock_move_count
  File "C:\Program Files (x86)\OpenERP\Server\server\.\openerp\osv\orm.py", line 2619, in read_group
  File "C:\Program Files (x86)\OpenERP\Server\server\.\openerp\osv\orm.py", line 4728, in _apply_ir_rules
  File "C:\Program Files (x86)\OpenERP\Server\server\openerp\addons\base\ir\ir_rule.py", line 156, in domain_get
  File "C:\Program Files (x86)\OpenERP\Server\server\.\openerp\osv\orm.py", line 4676, in _where_calc
  File "C:\Program Files (x86)\OpenERP\Server\server\.\openerp\osv\expression.py", line 632, in __init__
  File "C:\Program Files (x86)\OpenERP\Server\server\.\openerp\osv\expression.py", line 806, in parse
ValueError: Invalid field 'message_follower_ids' in leaf "<osv.ExtendedLeaf: ('message_follower_ids', 'in', [72]) on stock_move (ctx: )>"

Related branches

Carlos Pueyo (cpueyo)
Changed in openobject-addons:
status: New → Confirmed
Carlos Pueyo (cpueyo)
tags: added: followers
tags: added: message
tags: added: invalid product purchase
Revision history for this message
Twinkle Christian(OpenERP) (tch-openerp) wrote :

Hello Carlos Pueyo,

I have checked your issue with latest OpenERP 7.0-20130129-000102 on windows 7. But I am not able to reproduce this issue. So, Would you please try with latest? and also provide us more information about your report.

Thanks & waiting for your replay..

Changed in openobject-addons:
status: Confirmed → Incomplete
summary: - [7.0] Purchases Product Invalid Field Message Followers
+ [Windows][7.0] Purchases Product Invalid Field Message Followers
Revision history for this message
Fatih Güneş (fatih-c) wrote : Re: [Windows][7.0] Purchases Product Invalid Field Message Followers

Hello,
I get the same error message after making a partial delivery on incoming shipments and delivery orders. I use Openerp version 70 on windows 7 with Chrome. Here are steps to reproduce:
- Open a delivery order
- edit quantity to make a partial delivery
- confirm delivery
- try to reopen delivery orders (both original and new one)

Revision history for this message
DBVIJ (dbvij) wrote :

Hi all,
I face the same issue.
OpenERP 7.0-20130131-000102
Windows Server 2003 R2
- Create a new database with load data option set
- install Sales Management
- set multi-company up
- allow portal to user Demo User (access rights)
- log in with user Demo User
- go to sales/products
Then the errror message raise

Now, if you unset the portal setting for the user Demo User, the message does not raise anymore

Carlos Pueyo (cpueyo)
Changed in openobject-addons:
status: Incomplete → Confirmed
Revision history for this message
Carlos Pueyo (cpueyo) wrote :

I can reproduce it in the last version.

I catch the problem in %openerp-server%/openerp/addons/portal_stock/security/portal_security.xml:(Line 9)

Revision history for this message
Carlos Pueyo (cpueyo) wrote :

How to temporaly solve it:

Go with Administrator -> Configuration -> Technic -> Security -> Register Rules -> Search "Stock Move" and select Object -> This show two results -> Click in Portal Personal Stock Move -> Edit -> De-activate rule -> Save

All work fine now.

Revision history for this message
Jignesh Rathod(OpenERP) (jir-openerp) wrote :
Changed in openobject-addons:
importance: Undecided → Critical
importance: Critical → Medium
assignee: nobody → OpenERP R&D Addons Team 2 (openerp-dev-addons2)
Revision history for this message
Alexandre Fayolle - camptocamp (alexandre-fayolle-c2c) wrote :

This bug is not windows-specific. I get the same one on my ubuntu laptop. Changing the bug title accordingly.

summary: - [Windows][7.0] Purchases Product Invalid Field Message Followers
+ [7.0] Purchases Product Invalid Field Message Followers
summary: - [7.0] Purchases Product Invalid Field Message Followers
+ Purchases Product Invalid Field Message Followers
Revision history for this message
Nhomar - Vauxoo (nhomar) wrote :
Download full text (3.7 KiB)

Hello.

This error is a problem with overlapping ACL's.

It is happening to me but with projects.

Create an User.
Give access as Project Manager.
Allow Contact Creation.
"SET PORTAL"

Kabum.

"TAKE OFF PORTAL"

Works.

IMHO it is an ACL problem.

You can test on:

http://7-0-7620.runbot.openerp.com/

login as nhomar pwd nhomar.....

I will attach this bug to our OPW.

A video Showing the problem.

http://youtu.be/_9lUSMT1T-U

2013-04-24 04:56:59,445 1845 ERROR agrinos openerp.netsvc: Invalid field 'message_follower_ids' in leaf "<osv.ExtendedLeaf: ('message_follower_ids', 'in', [5]) on project_phase (ctx: )>"
Traceback (most recent call last):
  File "/mnt/home/production/openerp7_production/server/openerp/netsvc.py", line 293, in dispatch_rpc
    result = ExportService.getService(service_name).dispatch(method, params)
  File "/mnt/home/production/openerp7_production/server/openerp/service/web_services.py", line 626, in dispatch
    res = fn(db, uid, *params)
  File "/mnt/home/production/openerp7_production/server/openerp/osv/osv.py", line 188, in execute_kw
    return self.execute(db, uid, obj, method, *args, **kw or {})
  File "/mnt/home/production/openerp7_production/server/openerp/osv/osv.py", line 131, in wrapper
    return f(self, dbname, *args, **kwargs)
  File "/mnt/home/production/openerp7_production/server/openerp/osv/osv.py", line 197, in execute
    res = self.execute_cr(cr, uid, obj, method, *args, **kw)
  File "/mnt/home/production/openerp7_production/server/openerp/osv/osv.py", line 185, in execute_cr
    return getattr(object, method)(cr, uid, *args, **kw)
  File "/mnt/home/production/openerp7_production/server/openerp/osv/orm.py", line 3604, in read
    result = self._read_flat(cr, user, select, fields, context, load)
  File "/mnt/home/production/openerp7_production/server/openerp/osv/orm.py", line 3724, in _read_flat
    res2 = self._columns[f].get(cr, self, ids, f, user, context=context, values=res)
  File "/mnt/home/production/openerp7_production/server/openerp/osv/fields.py", line 1131, in get
    result = self._fnct(obj, cr, uid, ids, name, self._arg, context)
  File "/home/production/openerp7_production/addons/project_long_term/project_long_term.py", line 221, in _phase_count
    phase_ids = self.pool.get('project.phase').search(cr, uid, [('project_id', 'in', ids)])
  File "/mnt/home/production/openerp7_production/server/openerp/osv/orm.py", line 2354, in search
    return self._search(cr, user, args, offset=offset, limit=limit, order=order, context=context, count=count)
  File "/mnt/home/production/openerp7_production/server/openerp/osv/orm.py", line 4846, in _search
    self._apply_ir_rules(cr, user, query, 'read', context=context)
  File "/mnt/home/production/openerp7_production/server/openerp/osv/orm.py", line 4726, in _apply_ir_rules
    rule_where_clause, rule_where_clause_params, rule_tables = rule_obj.domain_get(cr, uid, self._name, mode, context=context)
  File "/mnt/home/production/openerp7_production/server/openerp/addons/base/ir/ir_rule.py", line 156, in domain_get
    query = self.pool.get(model_name)._where_calc(cr, SUPERUSER_ID, dom, active_test=False)
  File "/mnt/home/production/openerp7_production/ser...

Read more...

Changed in openobject-addons:
assignee: OpenERP R&D Addons Team 2 (openerp-dev-addons2) → OpenERP Publisher's Warranty Team (openerp-opw)
tags: added: maintenance
Revision history for this message
Rifakat Husen (OpenERP) (rha-openerp) wrote :

Hi Nhomar,

I checked it for project following your video and steps and get the same error. Confirming the problem!

I think problem lies in the record rule for Project Phase model,
['|',
('project_id.privacy_visibility', '=', 'public'),
 '&',
('project_id.privacy_visibility', 'in', ['portal', 'followers']),
'|',
('message_follower_ids','in', [user.partner_id.id]),
('user_id', '=', user.id),]

I think project.phase doesn't contain this field message_follower_ids, what do you think?
Regards,
Rifakat

Revision history for this message
Rifakat Husen (OpenERP) (rha-openerp) wrote :

Hi Carlos,

Problem for stock_move rule has been solved in the 7.0 mainline,
http://bazaar.launchpad.net/~openerp/openobject-addons/7.0/revision/8983

Updating module portal_stock should solve the problem now. I will fix problem
for project_phase error.

Thank s a lot for your detail execution,
Rifakat

Changed in openobject-addons:
status: Confirmed → In Progress
Revision history for this message
Rifakat Husen (OpenERP) (rha-openerp) wrote :

Fixed the problem in,
lp:~openerp-dev/openobject-addons/7.0-opw-591757-rha
r9081, <email address hidden>

Kindly let me know if it works ok for you or not.

Thanks,
rifakat Husen

Changed in openobject-addons:
status: In Progress → Fix Committed
Revision history for this message
Justin Kintzele (justin-x) wrote :

I can confirm that un-checking the "Portal" box under "Other" on a User's Access tab will fix this, and several other errors that are randomly generated when going in to other areas of the system. Not sure what exactly is happening, but I would agree with Nhomar - Vauxoo above on comment #8.

Revision history for this message
Naresh(OpenERP) (nch-openerp) wrote :

Fix released in stable 7 @9121 <email address hidden>

Changed in openobject-addons:
status: Fix Committed → Fix Released
milestone: none → 7.0
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.