What I mean is that;
Model with name "stock.return.picking" has "location_id" field.
When I click on the return button , I want to see all the location_id. But location_id has domain:
location_id = fields.Many2one(
comodel_name='stock.location',
string='Return Location',
domain="['|', ('id', '=', original_location_id),'&', ('return_location', '=', True), ('id', 'child_of', parent_location_id)]"
)
How can I change this domain?
You have to redefine the location_id
field, inheriting from stock.return.picking
model. You could do something like this:
location_id = fields.Many2one(
comodel_name='stock.location',
domain="[('id', '!=', 0)]",
)