[fix] description and dependencies
This commit is contained in:
parent
c5dcf8bdc3
commit
afbc9aaddc
6 changed files with 19 additions and 39 deletions
|
|
@ -22,8 +22,10 @@ NFU eCommerce
|
|||
|
||||
|badge1| |badge2| |badge3|
|
||||
|
||||
This module adds a minium and a maximum order quantity field to Website Sale Orders
|
||||
and adds it the customer balance to checkout of the website shop.
|
||||
This module adds a maximum order quantity field to Website Sale Orders. It also adds
|
||||
an ordered qantitiy field to store the original ordered quantity in case a manager
|
||||
adjustes the uom quantitiy. In webshop checkout it adds the customer balance to before
|
||||
and after the current order.
|
||||
|
||||
**Table of contents**
|
||||
|
||||
|
|
|
|||
|
|
@ -5,8 +5,8 @@
|
|||
"website": "https://www.bakeup.org",
|
||||
"category": "website",
|
||||
"version": "16.0.0.0.1",
|
||||
"depends": ["sale_management", "website_sale", "nfu_sale_order_batch_packaging"],
|
||||
"depends": ["website_sale", "nfu_sale_order_batch_packaging"],
|
||||
"data": ["views/templates.xml"],
|
||||
"assets": {"web.assets_frontend": ["nfu_sale_product_min_max_qty/static/src/js/website_sale.js"]},
|
||||
"assets": {"web.assets_frontend": ["nfu_ecommerce/static/src/js/website_sale.js"]},
|
||||
"license": "LGPL-3",
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,2 +1,4 @@
|
|||
This module adds a minium and a maximum order quantity field to Website Sale Orders
|
||||
and adds it the customer balance to checkout of the website shop.
|
||||
This module adds a maximum order quantity field to Website Sale Orders. It also adds
|
||||
an ordered qantitiy field to store the original ordered quantity in case a manager
|
||||
adjustes the uom quantitiy. In webshop checkout it adds the customer balance to before
|
||||
and after the current order.
|
||||
|
|
@ -370,8 +370,10 @@ ul.auto-toc {
|
|||
!! source digest: sha256:4dfaea54e4d01502b433eb5c0dcca409a5fbe2c3f175e29382a19230343183c9
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||||
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/lgpl-3.0-standalone.html"><img alt="License: LGPL-3" src="https://img.shields.io/badge/licence-LGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/bruecksen/ife_nfu/tree/16.0/nfu_ecommerce"><img alt="bruecksen/ife_nfu" src="https://img.shields.io/badge/github-bruecksen%2Fife_nfu-lightgray.png?logo=github" /></a></p>
|
||||
<p>This module adds a minium and a maximum order quantity field to Website Sale Orders
|
||||
and adds it the customer balance to checkout of the website shop.</p>
|
||||
<p>This module adds a maximum order quantity field to Website Sale Orders. It also adds
|
||||
an ordered qantitiy field to store the original ordered quantity in case a manager
|
||||
adjustes the uom quantitiy. In webshop checkout it adds the customer balance to before
|
||||
and after the current order.</p>
|
||||
<p><strong>Table of contents</strong></p>
|
||||
<div class="contents local topic" id="contents">
|
||||
<ul class="simple">
|
||||
|
|
|
|||
|
|
@ -1,36 +1,10 @@
|
|||
odoo.define("nfu_ecommerce.website_min_max_qty", function (require) {
|
||||
odoo.define("nfu_ecommerce.website_max_qty", function (require) {
|
||||
"use strict";
|
||||
var core = require("web.core");
|
||||
var _t = core._t;
|
||||
var wSaleUtils = require("website_sale.utils");
|
||||
var publicWidget = require("web.public.widget");
|
||||
require("website_sale.website_sale");
|
||||
publicWidget.registry.WebsiteSale.include({
|
||||
onClickAddCartJSON: function (ev) {
|
||||
ev.preventDefault();
|
||||
$(".css_quantity").popover("dispose");
|
||||
var $link = $(ev.currentTarget);
|
||||
var $input = $link.closest(".input-group").find("input");
|
||||
var min = parseFloat($input.data("min") || 0);
|
||||
var previousQty = parseFloat($input.val() || 0, 10);
|
||||
var quantity = ($link.has(".fa-minus").length ? -1 : 1) + previousQty;
|
||||
if (quantity < min) {
|
||||
$input.closest(".css_quantity").popover({
|
||||
content: _t(`Minimum Quantity is ${min}.`),
|
||||
title: _t("Warning"),
|
||||
placement: "left",
|
||||
trigger: "focus",
|
||||
html: true,
|
||||
});
|
||||
$input.closest(".css_quantity").popover("show");
|
||||
|
||||
setTimeout(function () {
|
||||
$(".css_quantity").popover("dispose");
|
||||
}, 3000);
|
||||
}
|
||||
this._super(ev);
|
||||
},
|
||||
|
||||
/**
|
||||
* Adds the max qty to the POST request when adding a product to the cart.
|
||||
* @override
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<template id="cart_lines_min_max_qty" inherit_id="website_sale.cart_lines" name="Shopping Cart Lines">
|
||||
<template id="cart_lines_max_qty" inherit_id="website_sale.cart_lines" name="Shopping Cart Lines">
|
||||
<xpath expr="//th[hasclass('td-qty')]" position="after">
|
||||
<th class="text-center td-qty">
|
||||
<t t-if="show_qty">
|
||||
<span>Max qty.</span>
|
||||
<span>Max Qty</span>
|
||||
</t>
|
||||
</th>
|
||||
</xpath>
|
||||
|
|
@ -74,9 +74,9 @@
|
|||
</td>
|
||||
</xpath>
|
||||
</template>
|
||||
<template id="cart_summary_min_max_qty" inherit_id="website_sale.cart_summary" name="Cart right column">
|
||||
<template id="cart_summary_max_qty" inherit_id="website_sale.cart_summary" name="Cart right column">
|
||||
<xpath expr="//th[hasclass('td-qty')]" position="after">
|
||||
<th class="border-top-0 td-qty">Max qty.</th>
|
||||
<th class="border-top-0 td-qty">Max Qty</th>
|
||||
</xpath>
|
||||
<xpath expr="//td[hasclass('td-qty')]" position="after">
|
||||
<td class='td-qty'>
|
||||
|
|
|
|||
Loading…
Reference in a new issue