Skip to content

Commit 84f50e1

Browse files
author
Tim
authored
[907][IMP] Consider all supplier stock in retail price display (#579)
1 parent 7e3e288 commit 84f50e1

File tree

2 files changed

+21
-18
lines changed

2 files changed

+21
-18
lines changed

website_timecheck/__manifest__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
{
44
"name": "Website Timecheck Function",
55
"category": "Website",
6-
"version": "12.0.1.3.1",
6+
"version": "12.0.1.3.2",
77
"license": "LGPL-3",
88
"author": "Quartile Limited",
99
"website": "https://www.quartile.co",

website_timecheck/views/templates.xml

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@
230230
style="position: static !important; padding: unset !important;"
231231
>
232232
<div
233-
t-if="product.qty_overseas != 0 and product.oversea_retail_currency_id != product.company_id.currency_id"
233+
t-if="(product.qty_overseas != 0 or product.qty_local_supplier_stock != 0) and product.oversea_retail_currency_id != product.company_id.currency_id"
234234
>
235235
<span>Retail in <span
236236
t-field="product.oversea_retail_currency_id.name"
@@ -248,7 +248,7 @@
248248
<div>
249249
<span>HKD Retail:</span>
250250
<t
251-
t-if="product.qty_overseas != 0 and product.oversea_retail_currency_id == product.company_id.currency_id and product.price &gt; product.oversea_retail_price"
251+
t-if="(product.qty_overseas != 0 or product.qty_local_supplier_stock != 0) and product.oversea_retail_currency_id == product.company_id.currency_id and product.list_price &gt; product.oversea_retail_price"
252252
>
253253
<t t-if="product.oversea_retail_price != 0">
254254
<span
@@ -260,11 +260,7 @@
260260
<span style="white-space: nowrap;">N/A</span>
261261
</t>
262262
</t>
263-
<t
264-
t-if="product.qty_overseas == 0 or
265-
product.qty_overseas != 0 and product.oversea_retail_currency_id != product.company_id.currency_id or
266-
product.qty_overseas != 0 and product.oversea_retail_currency_id == product.company_id.currency_id and product.price &lt;= product.oversea_retail_price"
267-
>
263+
<t t-else="">
268264
<t t-if="product.list_price != 0">
269265
<span
270266
t-esc="'{:,.0f}'.format(product.list_price)"
@@ -433,7 +429,7 @@
433429
t-att-data-precision="user_id.partner_id.property_product_pricelist.currency_id.rounding"
434430
>
435431
<div
436-
t-if="product.qty_overseas != 0 and product.oversea_retail_currency_id != product.company_id.currency_id"
432+
t-if="(product.qty_overseas != 0 or product.qty_local_supplier_stock != 0) and product.oversea_retail_currency_id != product.company_id.currency_id"
437433
>
438434
<span>Retail in <span
439435
t-field="product.oversea_retail_currency_id.name"
@@ -451,7 +447,7 @@
451447
<div>
452448
<span>HKD Retail:</span>
453449
<t
454-
t-if="product.qty_overseas != 0 and product.oversea_retail_currency_id == product.company_id.currency_id and product.price &gt; product.oversea_retail_price"
450+
t-if="(product.qty_overseas != 0 or product.qty_local_supplier_stock != 0) and product.oversea_retail_currency_id == product.company_id.currency_id and product.list_price &gt; product.oversea_retail_price"
455451
>
456452
<t t-if="product.oversea_retail_price != 0">
457453
<span
@@ -463,11 +459,7 @@
463459
<span style="white-space: nowrap;">N/A</span>
464460
</t>
465461
</t>
466-
<t
467-
t-if="product.qty_overseas == 0 or
468-
product.qty_overseas != 0 and product.oversea_retail_currency_id != product.company_id.currency_id or
469-
product.qty_overseas != 0 and product.oversea_retail_currency_id == product.company_id.currency_id and product.price &lt;= product.oversea_retail_price"
470-
>
462+
<t t-else="">
471463
<t t-if="product.list_price != 0">
472464
<span
473465
t-esc="'{:,.0f}'.format(product.list_price)"
@@ -771,12 +763,23 @@
771763
</li>
772764
</xpath>
773765
</template>
774-
<template id="pricelist_list" inherit_id="website_sale.pricelist_list" name="Pricelists Dropdown">
766+
<template
767+
id="pricelist_list"
768+
inherit_id="website_sale.pricelist_list"
769+
name="Pricelists Dropdown"
770+
>
775771
<xpath expr="//a[@role='button']" position="attributes">
776-
<attribute name="class">hidden-xs dropdown-toggle btn btn-secondary</attribute>
772+
<attribute
773+
name="class"
774+
>hidden-xs dropdown-toggle btn btn-secondary</attribute>
777775
</xpath>
778776
<xpath expr="//a[@role='button']" position="after">
779-
<a role="button" href="#" class="btn btn-sm btn-secondary dropdown-toggle visible-xs-inline" data-toggle="dropdown">
777+
<a
778+
role="button"
779+
href="#"
780+
class="btn btn-sm btn-secondary dropdown-toggle visible-xs-inline"
781+
data-toggle="dropdown"
782+
>
780783
<t t-esc="curr_pl and curr_pl.name or ' - '" />
781784
</a>
782785
</xpath>

0 commit comments

Comments
 (0)