Community mailing list archives

how can i filter pos.order by the current user?

- 09/24/2016 06:50:06
I added the following 3 fields on 'pos.order'      
pv_user=fields.Many2one("pos.config",compute="get_pv_use" ,  readonly=True,required=True)
pv_name=fields.Many2one("pos.config",compute="get_pv_name",  readonly=True, required=True)
pv_u_p=fields.Boolean(readonly=True,compute="get_pv_use", store=True, required=True)

the first field to get the point of sale for order,  the second field to get the point of sale for the current user, and the third field is of type boolean take the value 'True' if the 1st field = 2nd field or 2nd field = None and the value 'false' if not  
Here functions
    def get_pv_name(self):
    def get_pv_use(self):
        if use_o:
            for u in use_o:
                if ( or self.pv_user==self.pv_name):
                if ( and self.pv_user!=self.pv_name):
                if (not self.env.user.pos_config):

how I can filter the tree of 'pos.order' field with the 3rd field is true       domain=[('pv_u_p','=', True)]  ???????