Files
odoo_source/addons/sale/views/assets.xml
T
Prakash Prajapati 696ea173d3 [IMP] sale: Apply discount on all SO lines onchage of first SO line
Purpose fo the task is to Allow changing a discount for the whole SO.

So in this commit, On a quotation, with "discount per line" option
enabled, if the user changes the discount on the first SO line, display
a pop-up requesting if they want to apply the change to all the lines
of the SO.
There is condition to open the confirmation dialog to change on all SO lines:
  1. There should be 3 or more lines in SO
  2. Happens only when changing the discount of the first SO line
  3. The initial discount is the same on all lines
For Ex: Example : a SO with a discount of 10% on all 6 SO lines.
The user clicks the discount field on the first so line, changes to 20%.
A pop-up "apply this discount to all quotation lines"
-> if yes, apply 20% to all SO lines.

closes odoo/odoo#54262

Taskid: 2276759
Closes: #54262
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-07-16 10:22:57 +00:00

41 lines
2.4 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<template id="assets_backend_inherit_sale" inherit_id="web.assets_backend" name="Sale backend assets">
<xpath expr="link[last()]" position="after">
<link rel="stylesheet" type="text/scss" href="/sale/static/src/scss/sale_onboarding.scss"/>
<link rel="stylesheet" type="text/scss" href="/sale/static/src/scss/product_configurator.scss"/>
</xpath>
<xpath expr="script[last()]" position="after">
<script type="text/javascript" src="/sale/static/src/js/sale.js"></script>
<script type="text/javascript" src="/sale/static/src/js/tours/sale.js"></script>
<script type="text/javascript" src="/sale/static/src/js/product_configurator_widget.js"/>
<script type="text/javascript" src="/sale/static/src/js/sale_order_view.js"/>
<script type="text/javascript" src="/sale/static/src/js/product_discount_widget.js"/>
</xpath>
</template>
<template id="report_assets_common_inherit_sale" inherit_id="web.report_assets_common" name="Sale report common assets">
<xpath expr="link[last()]" position="after">
<link rel="stylesheet" type="text/scss" href="/sale/static/src/scss/sale_report.scss"/>
</xpath>
</template>
<template id="assets_frontend_inherit_sale" inherit_id="web.assets_frontend" name="Sale frontend assets">
<xpath expr="link[last()]" position="after">
<link rel="stylesheet" type="text/scss" href="/sale/static/src/scss/sale_portal.scss"/>
</xpath>
<xpath expr="script[last()]" position="after">
<script type="text/javascript" src="/sale/static/src/js/sale_portal_sidebar.js"></script>
</xpath>
</template>
<template id="assets_tests" name="Sale Assets Tests" inherit_id="web.assets_tests">
<xpath expr="." position="inside">
<script type="text/javascript" src="/sale/static/tests/tours/sale_signature.js"></script>
</xpath>
</template>
<template id="qunit_suite" name="sale_tests" inherit_id="web.qunit_suite_tests">
<xpath expr="." position="inside">
<script type="text/javascript" src="/sale/static/tests/product_configurator_tests.js"></script>
<script type="text/javascript" src="/sale/static/tests/sales_team_dashboard_tests.js"></script>
</xpath>
</template>
</odoo>