Merge lp:~nbessi-c2c-deactivatedaccount/account-invoice-report/7.0-better-x-path into lp:~account-core-editors/account-invoice-report/7.0

Proposed by Nicolas Bessi - Camptocamp
Status: Merged
Merged at revision: 10
Proposed branch: lp:~nbessi-c2c-deactivatedaccount/account-invoice-report/7.0-better-x-path
Merge into: lp:~account-core-editors/account-invoice-report/7.0
Diff against target: 12 lines (+1/-1)
1 file modified
invoice_webkit/view/invoice_view.xml (+1/-1)
To merge this branch: bzr merge lp:~nbessi-c2c-deactivatedaccount/account-invoice-report/7.0-better-x-path
Reviewer Review Type Date Requested Status
Stefan Rijnhart (Opener) Approve
Niels Huylebroeck (community) Approve
Guewen Baconnier @ Camptocamp Pending
Alexandre Fayolle - camptocamp code review, no test Pending
Review via email: mp+143867@code.launchpad.net

This proposal supersedes a proposal from 2013-01-16.

Description of the change

To post a comment you must log in.
Revision history for this message
Alexandre Fayolle - camptocamp (alexandre-fayolle-c2c) wrote : Posted in a previous version of this proposal

LGTM

review: Approve (code review, no test)
Revision history for this message
Guewen Baconnier @ Camptocamp (gbaconnier-c2c) wrote : Posted in a previous version of this proposal

LGTM

review: Approve
Revision history for this message
Nicolas Bessi - Camptocamp (nbessi-c2c-deactivatedaccount) wrote : Posted in a previous version of this proposal

Can somebody merge this one please.

Regards

Nicolas

Revision history for this message
Stefan Rijnhart (Opener) (stefan-opener) wrote : Posted in a previous version of this proposal

Will do so

Revision history for this message
Niels Huylebroeck (red15) wrote : Posted in a previous version of this proposal

Hold it, the intent is good, the xpath won't work afaik.

You have the following arch:

<field name="invoice_line">
   <tree string="Invoice Lines">
      ...
   </tree>
</field>

Thus your xpath of "//tree[@name='invoice_line']" cannot match, the tree itself does not have a name, it's the field above the tree that has the name !

This is why I suggested "//field[name='invoice_line']/tree" instead.

If the current xpath actually worked for you (tested) I will withdraw my remark but would be interested in knowing where my xpath understanding went wrong ?

review: Needs Fixing
Revision history for this message
Nicolas Bessi - Camptocamp (nbessi-c2c-deactivatedaccount) wrote : Posted in a previous version of this proposal

Hello,

Well your right.

I was tricked because updating the addon made a silent exception. But if you install it from scratch it wont install.

I will provide a fix soon.

Regards

Nicolas

Revision history for this message
Nicolas Bessi - Camptocamp (nbessi-c2c-deactivatedaccount) wrote : Posted in a previous version of this proposal

I revert the commit now as it induce a bug.

Nicolas

Revision history for this message
Nicolas Bessi - Camptocamp (nbessi-c2c-deactivatedaccount) wrote : Posted in a previous version of this proposal

FYI if you update the server to tag 7.0 update of addon will now also throw an exception.

Regards

Nicolas

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

Just corrected the MP.

Nicolas

Revision history for this message
Niels Huylebroeck (red15) wrote :

Thanks for handling it this quick, looks find to me now.

review: Approve
Revision history for this message
Stefan Rijnhart (Opener) (stefan-opener) wrote :

Approve and merged. Good catch, Niels!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'invoice_webkit/view/invoice_view.xml'
2--- invoice_webkit/view/invoice_view.xml 2013-01-16 08:23:31 +0000
3+++ invoice_webkit/view/invoice_view.xml 2013-01-18 11:57:21 +0000
4@@ -69,7 +69,7 @@
5 <field name="model">account.invoice</field>
6 <field name="inherit_id" ref="account.invoice_form"/>
7 <field name="arch" type="xml">
8- <xpath expr="//tree[@name='invoice_line']" position="attributes" >
9+ <xpath expr="//field[@name='invoice_line']/tree" position="attributes" >
10 <attribute name="editable" eval="False"/>
11 </xpath>
12 </field>

Subscribers

People subscribed via source and target branches