-1

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?

ChesuCR
  • 9,352
  • 5
  • 51
  • 114
Barış ERDOĞAN
  • 109
  • 2
  • 12

1 Answers1

4

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)]",
)
forvas
  • 9,801
  • 7
  • 62
  • 158