Skip to content
Snippets Groups Projects
Commit 567c7c8b authored by Pedram (PEBR)'s avatar Pedram (PEBR)
Browse files

[FIX] point_of_sale: set default language for new customers


Previously, when creating a new customer from the POS interface, if
the default language was not changed in the form, an empty string
would be sent to the backend. This resulted in the new customer not
having a language set.

This commit establishes the default language selection as the user's
selected language when creating a new customer within the POS system.

opw-3466525

closes odoo/odoo#133020

Signed-off-by: default avatarJoseph Caburnay (jcb) <jcb@odoo.com>
parent 4cdea395
No related branches found
No related tags found
No related merge requests found
......@@ -8,6 +8,7 @@ odoo.define('point_of_sale.PartnerListScreen', function(require) {
const { debounce } = require("@web/core/utils/timing");
const { useListener } = require("@web/core/utils/hooks");
const { useAsyncLockedMethod } = require("point_of_sale.custom_hooks");
const { session } = require("@web/session");
const { onWillUnmount, useRef } = owl;
......@@ -151,10 +152,11 @@ odoo.define('point_of_sale.PartnerListScreen', function(require) {
this.activateEditMode();
}
createPartner() {
// initialize the edit screen with default details about country & state
// initialize the edit screen with default details about country, state & lang
this.state.editModeProps.partner = {
country_id: this.env.pos.company.country_id,
state_id: this.env.pos.company.state_id,
lang: session.user_context.lang,
}
this.activateEditMode();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment