[16.0][ADD] sale_order_line_no_print: new module#3733
Conversation
5ef80b9 to
a46f680
Compare
|
@chienandalu , you also need to swap the display logic: |
Sure 🤦♂️ |
a46f680 to
742d226
Compare
742d226 to
b713f8e
Compare
yajo
left a comment
There was a problem hiding this comment.
Now it all looks good. However, I'm wondering... Shouldn't we require that you can only hide lines without amount? 🤔 Otherwise it's easy to shoot your own foot, hiding something with value and then the reports make no sense.
Well, one could then add another line that compensates the first one, so the final result is still 0. But that is weird 😵
WDYT @rafaelbn?
b713f8e to
51f15e2
Compare
I agree. Changed |
| widget="boolean_toggle" | ||
| options="{'autosave': False}" | ||
| optional="hide" | ||
| attrs="{'readonly': [('price_total', '!=', 0)], 'invisible': [('price_total', '!=', 0)]}" |
There was a problem hiding this comment.
thought: I'm not sure if this is enough... I could set total to zero, hide line, and change total. Maybe we should have a constraint in the model itself.
There was a problem hiding this comment.
I'd be afraid of performance for such case...
Jaimermaccione
left a comment
There was a problem hiding this comment.
@chienandalu Functional Review on Runbot environment. The module works as expected, but it does not allow modifying the report display status field when the document is a confirmed invoice.
While this behavior is understood to be intentional, it would be advisable to display a warning message to inform the user that the field cannot be edited in this state, in order to avoid confusion.
Thank you!
|
@chienandalu Could you explain the difference with: https://github.com/OCA/sale-reporting/tree/14.0/sale_layout_category_hide_detail |
@rousseldenis this goes on the line level without the need of defining sections. It's also meant to be passed to the stock.picking so it's possible to automatically hide some of the lines automatically (there isn't the concept of sections there) |
Indeed, we're discussing internally whether to let hiding anything at all in the invoice as it could be problematic |
444345a to
be9809d
Compare
|
Please check OCA/sale-reporting#329, which complements this PR. |
|
/ocabot rebase |
|
@rafaelbn The rebase process failed, because command |
|
Please @chienandalu rebase. And check test please @rousseldenis we study deeply but it doesn't fit or expand it would be complicated as @chienandalu said. |
be9809d to
648516c
Compare
|
Ready for review |
648516c to
d596bab
Compare
| just the beggining of the condition--> | ||
| <xpath | ||
| expr="//t[starts-with(@t-if, 'not line.display_type')]" | ||
| position="replace" |
There was a problem hiding this comment.
@chienandalu Don't you have any solution without replace?
There was a problem hiding this comment.
Well, this is not really replacing the node, but wrapping it inside a <t> tag. So it's equivalent to:
<xpath expr="//t[starts-with(@t-if, 'not line.display_type')]" position="before">
<t t-if="line.display_in_report" />
</xpath>
<xpath expr="//t[@t-if='line.display_in_report']" position="inside">
<xpath expr="//t[starts-with(@t-if, 'not line.display_type')]" position="move">
</xpath>d596bab to
58ac276
Compare
|
This PR has the |
aa5cc07 to
41951fd
Compare
2542d1b to
1420caf
Compare
Gelojr
left a comment
There was a problem hiding this comment.
Congratulations on the work @chienandalu great job!
The following tests were executed and all passed:
Test 1: On a quotation for “Chiquito de la Calzada SA”, hid a 0.00€ info line via Display in report; line did not appear on PDF/portal and totals unchanged — OK.
Test 2: On a quotation for “Lola Flores SL”, attempted to hide a 120.00€ line; toggle was not editable/shown and the line appeared on the report — OK.
Test 3: On a quotation for “Alaska y Dinarama”, hid a 0.00€ line and then set price to 10.00€; the line became visible automatically on PDF/portal — OK.
Test 4: From SO for “Mortadelo y Filemón S.A.” with a hidden 0.00€ line, created an invoice; the hidden line did not appear on the invoice PDF — OK.
Test 5: On a customer invoice for “David Bisbal”, hid a 0.00€ line via Display in report; the line did not appear on the invoice PDF and totals remained the same — OK.
|
/ocabot merge patch |
|
This PR looks fantastic, let's merge it! |
|
Congratulations, your PR was merged at 11b9b67. Thanks a lot for contributing to OCA. ❤️ |
cc @moduon MT-9255
@rafaelbn @yajo