[IMP] nfu_ecommerce: add credit to portal details (#38)
Co-authored-by: Niels Göttsch <ng@ife.de>
This commit is contained in:
parent
fee5016550
commit
ce23273f75
6 changed files with 38 additions and 2 deletions
|
|
@ -52,6 +52,7 @@ Changelog
|
|||
:1.3.1: Remove Max Qty from first page
|
||||
:1.3.2: Add decimal to ribbon
|
||||
:1.4.0: Add credit warning and avoid debts option
|
||||
:1.4.0: Add credit to portal details
|
||||
|
||||
Bug Tracker
|
||||
===========
|
||||
|
|
|
|||
|
|
@ -4,13 +4,14 @@
|
|||
"author": "BAKEUP",
|
||||
"website": "https://www.bakeup.org",
|
||||
"category": "website",
|
||||
"version": "16.0.1.4.0",
|
||||
"version": "16.0.1.4.1",
|
||||
"depends": [
|
||||
"sale_product_configurator",
|
||||
"website_sale",
|
||||
"nfu_sale_order_batch_packaging",
|
||||
"website_decimal_quantity",
|
||||
"nfu_product_bnn_attributes",
|
||||
"nfu_account",
|
||||
],
|
||||
"data": [
|
||||
"views/res_config_settings_views.xml",
|
||||
|
|
@ -20,6 +21,7 @@
|
|||
"assets": {
|
||||
"web.assets_frontend": [
|
||||
"nfu_ecommerce/static/src/js/*.js",
|
||||
"nfu_ecommerce/static/src/scss/portal.scss",
|
||||
]
|
||||
},
|
||||
"license": "LGPL-3",
|
||||
|
|
|
|||
|
|
@ -8,3 +8,4 @@
|
|||
:1.3.1: Remove Max Qty from first page
|
||||
:1.3.2: Add decimal to ribbon
|
||||
:1.4.0: Add credit warning and avoid debts option
|
||||
:1.4.0: Add credit to portal details
|
||||
|
|
@ -421,6 +421,8 @@ adjustes the uom quantitiy</li>
|
|||
</tr>
|
||||
<tr class="field"><th class="field-name">1.4.0:</th><td class="field-body">Add credit warning and avoid debts option</td>
|
||||
</tr>
|
||||
<tr class="field"><th class="field-name">1.4.0:</th><td class="field-body">Add credit to portal details</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
|
|
|||
16
nfu_ecommerce/static/src/scss/portal.scss
Normal file
16
nfu_ecommerce/static/src/scss/portal.scss
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
.o_portal_wrap {
|
||||
.o_portal_my_details_credit {
|
||||
position: relative;
|
||||
.fa {
|
||||
@include o-position-absolute(0, $left: 0);
|
||||
line-height: $line-height-base;
|
||||
|
||||
+ span,
|
||||
+ div {
|
||||
display: block;
|
||||
// FontAwesome '.fa-fw' fixed-with + margin
|
||||
padding-left: 1.28571429em + 0.5em;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -285,4 +285,18 @@
|
|||
</tr>
|
||||
</xpath>
|
||||
</template>
|
||||
<template id="portal_layout_inherit" name="Portal Layout" inherit_id="portal.portal_layout">
|
||||
<xpath expr="//div[hasclass('o_portal_my_details')]" position="inside">
|
||||
<div class="o_portal_my_details_credit">
|
||||
<i class="fa fa-credit-card fa-fw" role="img" aria-label="credit" title="Credit">
|
||||
</i>
|
||||
<span
|
||||
itemprop="credit"
|
||||
t-field="user_id.partner_id.nfu_credit"
|
||||
t-att-class="'monetary_field' + (' text-danger' if user_id.partner_id.nfu_credit < website.credit_warning_level else '')"
|
||||
t-options='{"widget": "monetary" , "display_currency": website.currency_id}'
|
||||
/>
|
||||
</div>
|
||||
</xpath>
|
||||
</template>
|
||||
</odoo>
|
||||
|
|
|
|||
Loading…
Reference in a new issue