[7.0] Generate recurring move is not company aware

Bug #1217779 reported by Nicolas Bessi - Camptocamp
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Fix Committed
Medium
OpenERP Publisher's Warranty Team

Bug Description

The wizard that generate recurring move ignore company and breaks on security rules in multi company mode.

Inside transient model "account.subscription.generate" function action_generate, there is a direct use of the cursor that ignore the user current company:
cr.execute('select id from account_subscription_line where date<%s and move_id is null', (data['date'],))

So it tries to generate lines for all companies and breaks on security rules

Regards

Nicolas

Related branches

summary: - Generate recurring move is not company aware
+ [7.0] Generate recurring move is not company aware
Amit Parik (amit-parik)
Changed in openobject-addons:
assignee: nobody → OpenERP R&D Addons Team 3 (openerp-dev-addons3)
importance: Undecided → Medium
status: New → Confirmed
Amit Parik (amit-parik)
tags: added: invoicing
tags: added: multi-company
Revision history for this message
Mahendra Barad(OpenERP) (mba-openerp) wrote :

Hello,

It has been fixed into https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-1217779-mba
branch with following

Revision ID: <email address hidden>
Revision No:9038

Thanks.

Changed in openobject-addons:
status: Confirmed → In Progress
status: In Progress → Fix Committed
Revision history for this message
Nicolas Bessi - Camptocamp (nbessi-c2c-deactivatedaccount) wrote :

hello,

Current SQL is faulty and gives following error

 ERROR: more than one row returned by a subquery used as an expression.

If we look to the query these error seems logical.

I have not investigate more, it is maybe due to corrupted setup and we should never have such configuration but I dont think so.

Alexandre query works out of the box.

Regards

Nicolas

Changed in openobject-addons:
assignee: OpenERP R&D Addons Team 3 (openerp-dev-addons3) → OpenERP Publisher's Warranty Team (openerp-opw)
tags: added: maintenance
Revision history for this message
Peter Langenberg (peter-langenberg) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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