Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • How to get oldest cache time in point of sale module in openerp

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 200
    Comment on it

    To achieve the oldest cache time first you have to install point of sale module and inherit the pos_config class in your own module and fetch cache ids in pos_config class and then use this function in your own module.

        @api.depends('cache_ids')
        def _get_oldest_cache_time(self):
            pos_cache = self.env['pos.cache']
            oldest_cache = pos_cache.search([('config_id', '=', self.id)], order='write_date', limit=1)
            if oldest_cache:
                self.oldest_cache_time = oldest_cache.write_date
    

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: