Merge lp:~camptocamp/purchase-wkfl/7.0-fix-button-visibility into lp:~purchase-core-editors/purchase-wkfl/7.0

Proposed by Nicolas Bessi - Camptocamp
Status: Merged
Approved by: Leonardo Pistone
Approved revision: 29
Merged at revision: 36
Proposed branch: lp:~camptocamp/purchase-wkfl/7.0-fix-button-visibility
Merge into: lp:~purchase-core-editors/purchase-wkfl/7.0
Diff against target: 25 lines (+2/-2)
2 files modified
framework_agreement/view/framework_agreement_view.xml (+1/-1)
framework_agreement/view/product_view.xml (+1/-1)
To merge this branch: bzr merge lp:~camptocamp/purchase-wkfl/7.0-fix-button-visibility
Reviewer Review Type Date Requested Status
Leonardo Pistone Approve
Yannick Vaucher @ Camptocamp code review, no tests Approve
Romain Deheele - Camptocamp (community) code review, test Approve
Pedro Manuel Baeza code review Approve
Review via email: mp+205304@code.launchpad.net

Commit message

[FIX] visibility of open agreement button in embeded form

Description of the change

[FIX] visibility of open agreement button in embeded form

To post a comment you must log in.
Revision history for this message
Pedro Manuel Baeza (pedro.baeza) wrote :

Hi, Nicolas,

Have you tried this modification? I think it will fail because '|' is a binary operator, and the last one hasn't got two operands.

Regards.

review: Needs Information
Revision history for this message
Nicolas Bessi - Camptocamp (nbessi-c2c-deactivatedaccount) wrote :

Yes it works and is already in agreement form view

Regards

Nicolas

Revision history for this message
Pedro Manuel Baeza (pedro.baeza) wrote :

OK, so I approve a code review then.

I suppose than it makes <condition> or False = <condition>.

Regards.

review: Approve (code review)
Revision history for this message
Romain Deheele - Camptocamp (romaindeheele) wrote :

Hello,

the button appears even if pricelists are not set, there is the same thing in FA view.

Romain

review: Needs Fixing (code review, test)
28. By Romain Deheele - Camptocamp

[FIX] fix attrs to manage button visibility

Revision history for this message
Romain Deheele - Camptocamp (romaindeheele) wrote :

LGTM,

Romain

review: Approve (code review, test)
Revision history for this message
Leonardo Pistone (lepistone) wrote :

As for Pedro's first review, the last '|' looks out of place.

If we call the conditions A, B, C, D, the expression is now

| A | B | C | D

Where I think it should be

| A | B | C D

because implicitly it is grouped as follows:

| A ( | B ( | C D ) )

thanks!

review: Needs Fixing (code review)
29. By Nicolas Bessi - Camptocamp

[FIX] view domain operator

Revision history for this message
Yannick Vaucher @ Camptocamp (yvaucher-c2c) :
review: Approve (code review, no tests)
Revision history for this message
Leonardo Pistone (lepistone) wrote :

lgtm thanks

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'framework_agreement/view/framework_agreement_view.xml'
2--- framework_agreement/view/framework_agreement_view.xml 2014-02-05 17:32:02 +0000
3+++ framework_agreement/view/framework_agreement_view.xml 2014-02-18 10:39:25 +0000
4@@ -30,7 +30,7 @@
5 context="{}"
6 string="Open Agreement"
7 type="object"
8- attrs="{'invisible': ['|', ('draft', '=', False), '|', ('start_date', '=', False), '|', ('end_date', '=', False), '|', ('framework_agreement_pricelist_ids', '=', False)]}"/>
9+ attrs="{'invisible': ['|', ('draft', '=', False), '|', ('start_date', '=', False), '|', ('end_date', '=', False), ('framework_agreement_pricelist_ids', '=', [])]}"/>
10 <field name="state"
11 widget="statusbar"
12 nolabel="1"
13
14=== modified file 'framework_agreement/view/product_view.xml'
15--- framework_agreement/view/product_view.xml 2014-02-05 17:32:02 +0000
16+++ framework_agreement/view/product_view.xml 2014-02-18 10:39:25 +0000
17@@ -15,7 +15,7 @@
18 context="{}"
19 string="Open Agreement"
20 type="object"
21- attrs="{'invisible': ['|', ('draft', '=', False), ('start_date', '=', False), ('end_date', '=', False), ('framework_agreement_pricelist_ids', '=', False)]}"/>
22+ attrs="{'invisible': ['|', ('draft', '=', False), '|', ('start_date', '=', False), '|', ('end_date', '=', False), ('framework_agreement_pricelist_ids', '=', [])]}"/>
23 <field name="state"
24 widget="statusbar"
25 nolabel="1"

Subscribers

People subscribed via source and target branches