Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- users = env['res.users'].search([('login', '=', 'nhomar@vauxoo.com')])
- if env.user not in users:
- raise Warning('Usted no esta autorizado para realizar esta acción!.')
- for record in records:
- for line in record.move_line_ids.filtered(lambda l: l.product_uom_qty > l.qty_done):
- line.write({'product_uom_qty': line.qty_done})
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement