Initial commit: OCA Technical packages (595 packages)

This commit is contained in:
Ernad Husremovic 2025-08-29 15:43:03 +02:00
commit 2cc02aac6e
24950 changed files with 2318079 additions and 0 deletions

View file

@ -0,0 +1,19 @@
/*
Copyright (C) 2022-Today GRAP (http://www.grap.coop)
@author Sylvain LE GAL (https://twitter.com/legalsylvain)
License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
*/
.pos .partnerlist-screen .partner-list span.membership-state-tag {
border-radius: 50rem !important;
border: 1px solid #cacaca;
font-size: 16px;
background-color: rgba(211, 211, 211, 0.5);
color: #444b5a;
overflow: hidden;
text-overflow: ellipsis;
margin-top: 4px;
padding-left: 4px;
display: block;
text-align: center;
}

View file

@ -0,0 +1,35 @@
odoo.define("pos_membership.PaymentScreen", function (require) {
"use strict";
const PaymentScreen = require("point_of_sale.PaymentScreen");
const Registries = require("point_of_sale.Registries");
// eslint-disable-next-line no-shadow
const OverloadPaymentScreen = (PaymentScreen) =>
// eslint-disable-next-line no-shadow
class OverloadPaymentScreen extends PaymentScreen {
async _isOrderValid() {
var has_membership_products = false;
this.currentOrder.get_orderlines().forEach(function (order_line) {
if (order_line.product.membership) {
has_membership_products = true;
}
});
if (has_membership_products && !this.currentOrder.is_to_invoice()) {
this.showPopup("ErrorPopup", {
title: this.env._t("Invoice Required"),
body: this.env._t(
"You should create an invoice if you sell membership products."
),
});
return false;
}
return await super._isOrderValid(...arguments);
}
};
Registries.Component.extend(PaymentScreen, OverloadPaymentScreen);
return PaymentScreen;
});

View file

@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!--
Copyright (C) 2022-Today GRAP (http://www.grap.coop)
@author Sylvain LE GAL (https://twitter.com/legalsylvain)
License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
-->
<templates id="template" xml:space="preserve">
<t
t-name="PartnerDetailsEdit"
t-inherit="point_of_sale.PartnerDetailsEdit"
t-inherit-mode="extension"
owl="1"
>
<xpath expr="//select[@name='country_id']/.." position="after">
<div class="partner-detail partner-detail-membership-state">
<span class="label">Membership State</span>
<input
class="detail"
name="membership_state_text"
readonly="readonly"
t-att-value="props.partner.membership_state_text"
/>
</div>
</xpath>
</t>
</templates>

View file

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!--
Copyright (C) 2022-Today GRAP (http://www.grap.coop)
@author Sylvain LE GAL (https://twitter.com/legalsylvain)
License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
-->
<templates id="template" xml:space="preserve">
<t
t-name="PartnerLine"
t-inherit="point_of_sale.PartnerLine"
t-inherit-mode="extension"
owl="1"
>
<xpath expr="//button[hasclass('edit-partner-button')]" position="after">
<span
t-if="props.partner.membership_state != 'none'"
class="membership-state-tag"
>
<t t-esc="props.partner.membership_state_text" />
</span>
</xpath>
</t>
</templates>