mirror of
https://github.com/bringout/oca-technical.git
synced 2026-04-19 23:32:07 +02:00
Initial commit: OCA Technical packages (595 packages)
This commit is contained in:
commit
2cc02aac6e
24950 changed files with 2318079 additions and 0 deletions
|
|
@ -0,0 +1,17 @@
|
|||
.pos .actionpad .button.pay.disabled-mode,
|
||||
.pos .actionpad .button.pay.disabled-mode:hover {
|
||||
background: #c7c7c7;
|
||||
color: #a5a1a1;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
.pos .ticket-screen .controls button.highlight.disabled-mode:hover {
|
||||
background: #c7c7c7;
|
||||
border: solid 1px rgb(220, 220, 220);
|
||||
color: #a5a1a1;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
.pos .ticket-screen .pointer.disabled-mode:hover {
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
odoo.define("pos_access_right.ActionpadWidget", function (require) {
|
||||
"use strict";
|
||||
|
||||
const Registries = require("point_of_sale.Registries");
|
||||
const ActionpadWidget = require("point_of_sale.ActionpadWidget");
|
||||
|
||||
const PosActionpadWidget = (OriginalActionpadWidget) =>
|
||||
class extends OriginalActionpadWidget {
|
||||
get hasPaymentControlRights() {
|
||||
return this.env.pos.user.hasGroupPayment;
|
||||
}
|
||||
};
|
||||
|
||||
Registries.Component.extend(ActionpadWidget, PosActionpadWidget);
|
||||
|
||||
return ActionpadWidget;
|
||||
});
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
odoo.define("pos_access_right.NumpadWidget", function (require) {
|
||||
"use strict";
|
||||
|
||||
const Registries = require("point_of_sale.Registries");
|
||||
const NumpadWidget = require("point_of_sale.NumpadWidget");
|
||||
|
||||
const PosNumpadWidget = (OriginalNumpadWidget) =>
|
||||
class extends OriginalNumpadWidget {
|
||||
get hasManualDiscount() {
|
||||
const res = super.hasManualDiscount;
|
||||
if (res) {
|
||||
return this.env.pos.user.hasGroupDiscount;
|
||||
}
|
||||
return res;
|
||||
}
|
||||
get hasMinusControlRights() {
|
||||
return this.env.pos.user.hasGroupNegativeQty;
|
||||
}
|
||||
get hasPriceControlRights() {
|
||||
const res = super.hasPriceControlRights;
|
||||
if (res) {
|
||||
return this.env.pos.user.hasGroupPriceControl;
|
||||
}
|
||||
return res;
|
||||
}
|
||||
};
|
||||
|
||||
Registries.Component.extend(NumpadWidget, PosNumpadWidget);
|
||||
|
||||
return NumpadWidget;
|
||||
});
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
odoo.define("pos_access_right.TicketScreen", function (require) {
|
||||
"use strict";
|
||||
|
||||
const Registries = require("point_of_sale.Registries");
|
||||
const TicketScreen = require("point_of_sale.TicketScreen");
|
||||
|
||||
const PosTicketScreen = (OriginalTicketScreen) =>
|
||||
class extends OriginalTicketScreen {
|
||||
get hasNewOrdersControlRights() {
|
||||
return this.env.pos.user.hasGroupMultiOrder;
|
||||
}
|
||||
|
||||
async _onDeleteOrder({detail: order}) {
|
||||
if (!this.env.pos.user.hasGroupDeleteOrder) {
|
||||
return;
|
||||
}
|
||||
return super._onDeleteOrder({detail: order});
|
||||
}
|
||||
};
|
||||
|
||||
Registries.Component.extend(TicketScreen, PosTicketScreen);
|
||||
|
||||
return TicketScreen;
|
||||
});
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<templates id="template" xml:space="preserve">
|
||||
|
||||
<t
|
||||
t-name="ActionpadWidget"
|
||||
t-inherit="point_of_sale.ActionpadWidget"
|
||||
t-inherit-mode="extension"
|
||||
owl="1"
|
||||
>
|
||||
<xpath
|
||||
expr="div[hasclass('actionpad')]//button[hasclass('pay')]"
|
||||
position="attributes"
|
||||
>
|
||||
<attribute
|
||||
name="t-att-class"
|
||||
>{'disabled-mode': !hasPaymentControlRights}</attribute>
|
||||
<attribute name="t-att-disabled">!hasPaymentControlRights</attribute>
|
||||
</xpath>
|
||||
</t>
|
||||
|
||||
</templates>
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<templates id="template" xml:space="preserve">
|
||||
|
||||
<t
|
||||
t-name="NumpadWidget"
|
||||
t-inherit="point_of_sale.NumpadWidget"
|
||||
t-inherit-mode="extension"
|
||||
owl="1"
|
||||
>
|
||||
<xpath
|
||||
expr="div[hasclass('numpad')]//button[hasclass('numpad-minus')]"
|
||||
position="attributes"
|
||||
>
|
||||
<attribute
|
||||
name="t-att-class"
|
||||
>{'disabled-mode': !hasMinusControlRights}</attribute>
|
||||
<attribute name="t-att-disabled">!hasMinusControlRights</attribute>
|
||||
</xpath>
|
||||
</t>
|
||||
|
||||
</templates>
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<templates id="template" xml:space="preserve">
|
||||
|
||||
<t
|
||||
t-name="TicketScreen"
|
||||
t-inherit="point_of_sale.TicketScreen"
|
||||
t-inherit-mode="extension"
|
||||
owl="1"
|
||||
>
|
||||
<xpath
|
||||
expr="//div[hasclass('ticket-screen')]//button[hasclass('highlight')]"
|
||||
position="attributes"
|
||||
>
|
||||
<attribute
|
||||
name="t-att-class"
|
||||
>{'disabled-mode': !hasNewOrdersControlRights}</attribute>
|
||||
<attribute name="t-att-disabled">!hasNewOrdersControlRights</attribute>
|
||||
</xpath>
|
||||
</t>
|
||||
|
||||
</templates>
|
||||
Loading…
Add table
Add a link
Reference in a new issue