Created
May 7, 2022 03:01
-
-
Save altela/8fb639bf0271f649634c2221b8269e84 to your computer and use it in GitHub Desktop.
Odoo Create Stock Quant
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# this block will create a stock_quant | |
# stock_quant is an on hand quantity inside certain location | |
create_quant = self.env['stock.quant'].with_context(inventory_mode=True).create({ | |
'product_id': self.product_id.id, | |
'location_id': self.location_destination.id, | |
'quantity': 0, | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment