-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Carmen Bianca BAKKER <[email protected]>
- Loading branch information
1 parent
53e5f72
commit aba31bb
Showing
8 changed files
with
73 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
from . import pos_session | ||
from . import res_partner |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# SPDX-FileCopyrightText: 2024 Coop IT Easy SC | ||
# | ||
# SPDX-License-Identifier: AGPL-3.0-or-later | ||
|
||
from odoo import models | ||
|
||
|
||
class PosSession(models.Model): | ||
_inherit = "pos.session" | ||
|
||
def _loader_params_res_partner(self): | ||
result = super()._loader_params_res_partner() | ||
result["search_params"]["fields"].append("child_eater_ids") | ||
return result |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
/* | ||
* SPDX-FileCopyrightText: 2024 Coop IT Easy SC | ||
* | ||
* SPDX-License-Identifier: AGPL-3.0-or-later | ||
*/ | ||
|
||
.pos .actionpad .button.set-partner .eaters { | ||
font-weight: normal; | ||
display: inline-block; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/** @odoo-module alias=pos_eater.ActionpadWidget **/ | ||
// SPDX-FileCopyrightText: 2024 Coop IT Easy SC | ||
// | ||
// SPDX-License-Identifier: AGPL-3.0-or-later | ||
|
||
import Registries from "point_of_sale.Registries"; | ||
|
||
const ActionpadWidget = require("point_of_sale.ActionpadWidget"); | ||
|
||
export const EaterActionpadWidget = (ActionpadWidget) => | ||
class extends ActionpadWidget { | ||
|
||
get eaterNames() { | ||
const names = this.props.partner.child_eater_ids.map( | ||
id => this.env.pos.db.get_partner_by_id(id).name | ||
); | ||
return names.join(", "); | ||
} | ||
|
||
}; | ||
|
||
Registries.Component.extend(ActionpadWidget, EaterActionpadWidget); |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<!-- | ||
SPDX-FileCopyrightText: 2024 Coop IT Easy SC | ||
SPDX-License-Identifier: AGPL-3.0-or-later | ||
--> | ||
<templates id="template" xml:space="preserve"> | ||
|
||
<t | ||
t-name="ActionpadWidget" | ||
t-inherit="point_of_sale.ActionpadWidget" | ||
t-inherit-mode="extension" | ||
owl="1" | ||
> | ||
<xpath expr="//t[@t-esc='props.partner.name']" position="after"> | ||
<t t-if="props.partner.child_eater_ids"> | ||
<span class="eaters"> | ||
<t t-esc="eaterNames" /> | ||
</span> | ||
</t> | ||
</xpath> | ||
</t> | ||
|
||
</templates> |
This file was deleted.
Oops, something went wrong.