Advertisement
Guest User

Untitled

a guest
Jul 20th, 2019
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. users = env['res.users'].search([('login', '=', 'nhomar@vauxoo.com')])
  2. if env.user not in users:
  3. raise Warning('Usted no esta autorizado para realizar esta acción!.')
  4. for record in records:
  5. for line in record.move_line_ids.filtered(lambda l: l.product_uom_qty > l.qty_done):
  6. line.write({'product_uom_qty': line.qty_done})
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement