[FIX] point_of_sale: new table duplicates

Add new tables in POS screen, close the screen and resume the session
again, the tables you created duplicate

closes odoo/odoo#27924
This commit is contained in:
Gert Pellin
2018-10-18 07:54:11 +00:00
parent 84481726dc
commit c19f0a7a5d
@@ -259,7 +259,8 @@ var TableWidget = PosBaseWidget.extend({
args: [[['id', '=', table_id]], fields],
limit: 1,
})
.then(function (table){
.then(function (result){
var table = result[0];
for (var field in table) {
self.table[field] = table[field];
}