[IMP] point_of_sale: add hook for load_new_partners domain
To be able to change the domain closes odoo/odoo#32982 Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
This commit is contained in:
committed by
Martin Trigaux
parent
5d57e1862f
commit
d7b0e4b5b7
@@ -586,13 +586,17 @@ exports.PosModel = Backbone.Model.extend({
|
||||
return loaded;
|
||||
},
|
||||
|
||||
prepare_new_partners_domain: function(){
|
||||
return [['customer','=',true], ['write_date','>', this.db.get_partner_write_date()]];
|
||||
},
|
||||
|
||||
// reload the list of partner, returns as a promise that resolves if there were
|
||||
// updated partners, and fails if not
|
||||
load_new_partners: function(){
|
||||
var self = this;
|
||||
return new Promise(function (resolve, reject) {
|
||||
var fields = _.find(self.models, function(model){ return model.label === 'load_partners'; }).fields;
|
||||
var domain = [['customer','=',true],['write_date','>',self.db.get_partner_write_date()]];
|
||||
var domain = self.prepare_new_partners_domain();
|
||||
rpc.query({
|
||||
model: 'res.partner',
|
||||
method: 'search_read',
|
||||
|
||||
Reference in New Issue
Block a user