I have created a Many2one field in my custom model
Python:
class SalesGroup(models.Model):
_name = 'pl.sales.group'
warehouse_id = fields.Many2one('stock.warehouse', string='Warehouse',required=True)
However, when i am creating/editing a record, all the warehouses listed down, but when i select one value and save the form/record, the warehouse field sets to null.