Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Done by RHT on the 27/05/2024
- # Reviewed by SEA on the 03/06/2024
- # Review: https://pastebin.com/9sp9W7E7
- # Need: have an automatic internal reference
- # Task: https://www.odoo.com/odoo/project.task/3942972?cids=1
- for product in records.filtered(lambda c: c.default_code is not set):
- code = product.env['ir.sequence'].next_by_code('product.product.sequence')
- product["default_code"] = code
- product["barcode"] = code
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement