Tryton Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(818)

Issue 60551002: tryton-env: Display ids and rule names on access error

Can't Edit
Can't Publish+Mail
Start Review
Created:
1 week, 1 day ago by ced
Modified:
2 days, 7 hours ago
Reviewers:
pokoli, reviewbot, dave
Visibility:
Public.

Description

Patch Set 1 #

Total comments: 5

Patch Set 2 : Better help message #

Total comments: 9

Patch Set 3 : Improve error message #

Unified diffs Side-by-side diffs Delta from patch set Stats (+286 lines, -81 lines) Patch
M modules/account/account.xml View 5 chunks +5 lines, -0 lines 0 comments Download
M modules/account/fiscalyear.xml View 1 chunk +1 line, -0 lines 0 comments Download
M modules/account/period.xml View 1 chunk +1 line, -0 lines 0 comments Download
M modules/account/tax.xml View 4 chunks +4 lines, -0 lines 0 comments Download
M modules/account_asset/asset.xml View 1 chunk +1 line, -0 lines 0 comments Download
M modules/account_dunning/dunning.xml View 1 chunk +1 line, -0 lines 0 comments Download
M modules/account_invoice/account.xml View 1 chunk +1 line, -0 lines 0 comments Download
M modules/account_invoice/invoice.xml View 2 chunks +2 lines, -0 lines 0 comments Download
M modules/account_payment/payment.xml View 3 chunks +3 lines, -0 lines 0 comments Download
M modules/account_payment_sepa/payment.xml View 2 chunks +2 lines, -0 lines 0 comments Download
M modules/account_product/product.xml View 4 chunks +4 lines, -0 lines 0 comments Download
M modules/account_statement/journal.xml View 1 chunk +1 line, -0 lines 0 comments Download
M modules/account_statement/statement.xml View 4 chunks +4 lines, -0 lines 0 comments Download
M modules/account_stock_landed_cost/account.xml View 1 chunk +1 line, -0 lines 0 comments Download
M modules/analytic_account/rule.xml View 1 chunk +1 line, -0 lines 0 comments Download
M modules/company/company.xml View 2 chunks +2 lines, -0 lines 0 comments Download
M modules/product_price_list/price_list.xml View 1 chunk +1 line, -0 lines 0 comments Download
M modules/production/production.xml View 1 chunk +1 line, -0 lines 0 comments Download
M modules/production_work/work.xml View 3 chunks +3 lines, -0 lines 0 comments Download
M modules/project_invoice/timesheet.xml View 1 chunk +1 line, -0 lines 0 comments Download
M modules/purchase/purchase.xml View 2 chunks +2 lines, -0 lines 0 comments Download
M modules/purchase_request/purchase_request.xml View 1 chunk +1 line, -0 lines 0 comments Download
M modules/purchase_request_quotation/purchase.xml View 2 chunks +2 lines, -0 lines 0 comments Download
M modules/purchase_requisition/purchase.xml View 4 chunks +4 lines, -0 lines 0 comments Download
M modules/sale/sale.xml View 1 chunk +1 line, -0 lines 0 comments Download
M modules/sale_complaint/complaint.xml View 2 chunks +2 lines, -0 lines 0 comments Download
M modules/sale_extra/sale.xml View 2 chunks +2 lines, -0 lines 0 comments Download
M modules/sale_opportunity/opportunity.xml View 4 chunks +4 lines, -0 lines 0 comments Download
M modules/sale_promotion/sale.xml View 1 chunk +1 line, -0 lines 0 comments Download
M modules/sale_supply_drop_shipment/stock.xml View 1 chunk +1 line, -0 lines 0 comments Download
M modules/stock/move.xml View 1 chunk +1 line, -0 lines 0 comments Download
M modules/stock/shipment.xml View 5 chunks +5 lines, -0 lines 0 comments Download
M modules/stock_location_move/stock.xml View 2 chunks +2 lines, -0 lines 0 comments Download
M modules/stock_supply/order_point.xml View 1 chunk +1 line, -0 lines 0 comments Download
M modules/timesheet/line.xml View 4 chunks +4 lines, -0 lines 0 comments Download
M modules/timesheet/work.xml View 2 chunks +2 lines, -0 lines 0 comments Download
M trytond/CHANGELOG View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M trytond/trytond/ir/message.xml View 1 2 1 chunk +18 lines, -2 lines 0 comments Download
M trytond/trytond/ir/rule.py View 1 6 chunks +62 lines, -44 lines 0 comments Download
M trytond/trytond/model/modelsql.py View 2 chunks +70 lines, -30 lines 0 comments Download
M trytond/trytond/res/ir.xml View 14 chunks +14 lines, -0 lines 0 comments Download
M trytond/trytond/res/user.xml View 3 chunks +3 lines, -0 lines 0 comments Download
M trytond/trytond/tests/test_rule.py View 16 chunks +43 lines, -5 lines 0 comments Download

Messages

Total messages: 11
ced
1 week, 1 day ago (2019-02-08 13:46:08 UTC) #1
reviewbot
https://codereview.tryton.org/60551002/diff/1/trytond/trytond/model/modelsql.py#newcode375 trytond/trytond/model/modelsql.py:375: E127 continuation line over-indented for visual indent https://codereview.tryton.org/60551002/diff/1/trytond/trytond/ir/rule.py#newcode53 trytond/trytond/ir/rule.py:53: E712 comparison to False ...
1 week, 1 day ago (2019-02-08 14:20:05 UTC) #2
pokoli
https://codereview.tryton.org/60551002/diff/1/trytond/trytond/ir/rule.py File trytond/trytond/ir/rule.py (right): https://codereview.tryton.org/60551002/diff/1/trytond/trytond/ir/rule.py#newcode27 trytond/trytond/ir/rule.py:27: help="Display to users when access error are raised.") Display ...
1 week ago (2019-02-09 18:25:51 UTC) #3
ced
https://codereview.tryton.org/60551002/diff/1/trytond/trytond/ir/rule.py File trytond/trytond/ir/rule.py (right): https://codereview.tryton.org/60551002/diff/1/trytond/trytond/ir/rule.py#newcode27 trytond/trytond/ir/rule.py:27: help="Display to users when access error are raised.") On ...
1 week ago (2019-02-09 18:40:08 UTC) #4
ced
1 week ago (2019-02-09 18:45:15 UTC) #5
reviewbot
https://codereview.tryton.org/60551002/diff/20001/trytond/trytond/model/modelsql.py#newcode375 trytond/trytond/model/modelsql.py:375: E127 continuation line over-indented for visual indent https://codereview.tryton.org/60551002/diff/20001/trytond/trytond/ir/rule.py#newcode53 trytond/trytond/ir/rule.py:53: E712 comparison to False ...
1 week ago (2019-02-09 18:52:20 UTC) #6
dave
https://codereview.tryton.org/60551002/diff/20001/modules/account/tax.xml File modules/account/tax.xml (right): https://codereview.tryton.org/60551002/diff/20001/modules/account/tax.xml#newcode186 modules/account/tax.xml:186: <field name="name">User in company</field> When displayed in the error ...
2 days, 21 hours ago (2019-02-13 22:43:00 UTC) #7
ced
https://codereview.tryton.org/60551002/diff/20001/modules/account/tax.xml File modules/account/tax.xml (right): https://codereview.tryton.org/60551002/diff/20001/modules/account/tax.xml#newcode186 modules/account/tax.xml:186: <field name="name">User in company</field> On 2019/02/13 22:43:00, dave wrote: ...
2 days, 9 hours ago (2019-02-14 10:46:45 UTC) #8
ced
2 days, 9 hours ago (2019-02-14 10:51:38 UTC) #9
reviewbot
https://codereview.tryton.org/60551002/diff/40001/trytond/trytond/model/modelsql.py#newcode375 trytond/trytond/model/modelsql.py:375: E127 continuation line over-indented for visual indent https://codereview.tryton.org/60551002/diff/40001/trytond/trytond/ir/rule.py#newcode53 trytond/trytond/ir/rule.py:53: E712 comparison to False ...
2 days, 8 hours ago (2019-02-14 11:20:50 UTC) #10
dave
2 days, 7 hours ago (2019-02-14 12:01:48 UTC) #11
https://codereview.tryton.org/60551002/diff/20001/modules/account/tax.xml
File modules/account/tax.xml (right):

https://codereview.tryton.org/60551002/diff/20001/modules/account/tax.xml#new...
modules/account/tax.xml:186: <field name="name">User in company</field>
On 2019/02/14 10:46:45, ced wrote:
> On 2019/02/13 22:43:00, dave wrote:
> > When displayed in the error messages I'm not really sure this name makes it
> > particularly clear what the rule is, and why it would be preventing access.
> > 
> > So I was wondering if:
> > Company is user's current company
> > would be a good name for this rule?
> 
> It should be seen as a part of the general error message like:
> 
>     You are not allowed to create records "%(model)s" because they fail on at
> lease one of those rules:
>     User in company
>     …

Yes, "User in company" is very terse, and in the error message I don't think it
conveys much information to the user about the rule.  That's why I suggested
"Company is user's current company", but to work will with the read, write, and
delete rules it might be better as?

    You are not allowed to delete records "5, 7, 11" of "Tax Code" because of at
least one of these rules:
    Company must be user's current company
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld 0147766