跳至内容
菜单
此问题已终结
1 回复
6554 查看

How to filter the customers in a multi company system where i can see only the customers that is related to the current company...now it is showing all customers inside pos session

形象
丢弃
最佳答案

In js folder of pos module you can find the model.js (line no. near to 171) where you find the below code:

model: 'res.partner',

fields: ['name','street','city','state_id','country_id','vat','phone','zip','mobile','email','ean13','write_date'],

domain: [['customer','=',true]],

loaded: function(self,partners){

self.partners = partners;

self.db.add_partners(partners);

},


you can add your domain like:


domain: [['customer','=',true], ['company_id','=', USERCOMPANYID]],

 You have to extend the js file of pos.


Here you can find how to inherit the js in pos

http://odoo-development.readthedocs.io/en/latest/dev/pos/add_field.html

Hope this will help you.


形象
丢弃
相关帖文 回复 查看 活动
3
4月 25
1371
1
8月 24
2170
3
5月 24
11468
1
9月 23
3696
0
8月 23
1789