Merge lp:~acsone-openerp/account-financial-tools/account_credit_control_portal_portal_lp1248906 into lp:~account-core-editors/account-financial-tools/7.0

Proposed by Stéphane Bidoul (Acsone) on 2013-11-07
Status: Work in progress
Proposed branch: lp:~acsone-openerp/account-financial-tools/account_credit_control_portal_portal_lp1248906
Merge into: lp:~account-core-editors/account-financial-tools/7.0
Diff against target: 12 lines (+2/-1)
1 file modified
account_credit_control/security/ir.model.access.csv (+2/-1)
To merge this branch: bzr merge lp:~acsone-openerp/account-financial-tools/account_credit_control_portal_portal_lp1248906
Reviewer Review Type Date Requested Status
Stefan Rijnhart (Opener) Needs Fixing on 2014-03-23
Yannick Vaucher @ Camptocamp Needs Fixing on 2014-02-13
Pedro Manuel Baeza code review, no test 2013-11-07 Approve on 2013-11-07
Review via email: mp+194315@code.launchpad.net

Commit message

[FIX] fix bug in account_credit_control preventing portal user to view their invoices

Description of the change

Here is a proposal to fix an issue preventing portal users to view their invoices.

The fix consists in allowing read access to credit control lines to portal users. The lines remain invisible on screen as the corresponding tab is reserved for specific accout credit control groups.

To post a comment you must log in.
Pedro Manuel Baeza (pedro.baeza) wrote :

LGTM. It's an ugly hack, but for now I don't see better solution. It's up to OpenERP to fix the way account.invoice is queried to avoid giving permissions to all the linked models.

Regards.

review: Approve (code review, no test)

A cleaner way could be to add this in a link module as you can uninstall portal (auto install but not mandatory).
There isn't any dependancy from account_credit_control on portal

This could be included in a account_credit_control_portal module depending on credit control and portal.

review: Needs Fixing

If I understand correctly, this change creates an implicit dependency on portal. While this module is set to autoinstall, we often disable it on our setups. Maybe it would be a slightly less ugly workaround to add the tab with the lines of this particular model in a separate view definition with group_ids set to the manager group?

review: Needs Fixing

s/group_ids/groups_id/

Unmerged revisions

125. By Stéphane Bidoul (Acsone) on 2013-11-07

[FIX] fix bug in account_credit_control preventing portal user to view their invoices

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'account_credit_control/security/ir.model.access.csv'
2--- account_credit_control/security/ir.model.access.csv 2013-07-12 11:57:49 +0000
3+++ account_credit_control/security/ir.model.access.csv 2013-11-07 11:02:25 +0000
4@@ -18,4 +18,5 @@
5 "account_credit_control.ir_model_access_289",0,0,"group_account_credit_control_info","credit_control_info_level","account_credit_control.model_credit_control_policy_level",1,0
6 "account_credit_control.ir_model_access_290",0,0,"account.group_account_user","credit_control_fin_user_line","account_credit_control.model_credit_control_line",1,0
7 "account_credit_control.ir_model_access_291",0,0,"account.group_account_invoice","credit_control_fin_invoice_line","account_credit_control.model_credit_control_line",1,0
8-"account_credit_control.ir_model_access_292",1,1,"account.group_account_manager","credit_control_fin_manager_line","account_credit_control.model_credit_control_line",1,1
9\ No newline at end of file
10+"account_credit_control.ir_model_access_292",1,1,"account.group_account_manager","credit_control_fin_manager_line","account_credit_control.model_credit_control_line",1,1
11+"account_credit_control.ir_model_access_293",0,0,"portal.group_portal","credit_control_line_portal","account_credit_control.model_credit_control_line",1,0
12\ No newline at end of file

Subscribers

People subscribed via source and target branches