[FIX] point_of_sale: partners should be searchable by phone or mobile number
This commit is contained in:
parent
4ae6babb29
commit
7e18563bdb
|
@ -209,6 +209,15 @@ function openerp_pos_db(instance, module){
|
|||
if(partner.address){
|
||||
str += '|' + partner.address;
|
||||
}
|
||||
if(partner.phone){
|
||||
str += '|' + partner.phone.split(' ').join('');
|
||||
}
|
||||
if(partner.mobile){
|
||||
str += '|' + partner.mobile.split(' ').join('');
|
||||
}
|
||||
if(partner.email){
|
||||
str += '|' + partner.email;
|
||||
}
|
||||
return str + '\n';
|
||||
},
|
||||
add_partners: function(partners){
|
||||
|
|
|
@ -637,7 +637,6 @@ function openerp_pos_screens(instance, module){ //module is instance.point_of_sa
|
|||
perform_search: function(query, associate_result){
|
||||
if(query){
|
||||
var customers = this.pos.db.search_partner(query);
|
||||
console.log(customers);
|
||||
this.display_client_details('hide');
|
||||
if ( associate_result && customers.length === 1){
|
||||
this.new_client = customers[0];
|
||||
|
|
|
@ -290,6 +290,7 @@
|
|||
<tr class='client-line' t-att-data-id='partner.id'>
|
||||
<td><t t-esc='partner.name' /></td>
|
||||
<td><t t-esc='partner.address' /></td>
|
||||
<td><t t-esc='partner.phone or partner.mobile or ""' /></td>
|
||||
</tr>
|
||||
</t>
|
||||
|
||||
|
@ -369,6 +370,7 @@
|
|||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Address</th>
|
||||
<th>Phone</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class='client-list-contents'>
|
||||
|
|
Loading…
Reference in New Issue