[FIX] point_of_sale: default state/country are not saved on creating

STEPS:
* set state/country for current company
* open POS
* create partner without changing default state/country values

BEFORE: the values are not saved
AFTER:  the values are saved

WHY: the values are set, but not copied to `changes` variable:

https://github.com/odoo/odoo/blob/2a8f777c04bdbdce77dc44d92e099612f158cbef/addons/point_of_sale/static/src/js/Screens/ClientListScreen/ClientListScreen.js#L43-L44

---

opw-2519788

closes odoo/odoo#71981

X-original-commit: b95ad8033c58d54f0b7137117be6d506f0b5dc56
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
Signed-off-by: Ivan Yelizariev // IEL <yelizariev@users.noreply.github.com>
This commit is contained in:
Ivan Yelizariev
2021-06-10 12:37:09 +00:00
parent ee94c0c357
commit 0f19ecec46
@@ -10,7 +10,11 @@ odoo.define('point_of_sale.ClientDetailsEdit', function(require) {
constructor() {
super(...arguments);
this.intFields = ['country_id', 'state_id', 'property_product_pricelist'];
this.changes = {};
const partner = this.props.partner;
this.changes = {
'country_id': partner.country_id && partner.country_id[0],
'state_id': partner.state_id && partner.state_id[0],
};
}
mounted() {
this.env.bus.on('save-customer', this, this.saveChanges);