[FIX] point_of_sale: fix the behavior of default fiscal positions
Issue 1) and 3) in73f7567627still occured in 11.0. It seems this was not fully forward-ported, most likely due to conflicts caused byac89783d2f. opw-782855
This commit is contained in:
@@ -1170,8 +1170,9 @@ var ClientListScreenWidget = ScreenWidget.extend({
|
||||
var order = this.pos.get_order();
|
||||
if( this.has_client_changed() ){
|
||||
var default_fiscal_position_id = _.findWhere(this.pos.fiscal_positions, {'id': this.pos.config.default_fiscal_position_id[0]});
|
||||
if ( this.new_client ) {
|
||||
order.fiscal_position = _.findWhere(this.pos.fiscal_positions, {'id': this.new_client.property_account_position_id[0]});
|
||||
if ( this.new_client && this.new_client.property_account_position_id ) {
|
||||
var client_fiscal_position_id = _.findWhere(this.pos.fiscal_positions, {'id': this.new_client.property_account_position_id[0]});
|
||||
order.fiscal_position = client_fiscal_position_id || default_fiscal_position_id;
|
||||
order.set_pricelist(_.findWhere(this.pos.pricelists, {'id': this.new_client.property_product_pricelist[0]}) || this.pos.default_pricelist);
|
||||
} else {
|
||||
order.fiscal_position = default_fiscal_position_id;
|
||||
|
||||
Reference in New Issue
Block a user