[FIX] rma: Set default source location for RMA created from scratch

This commit is contained in:
Ernesto Tejeda
2021-03-04 10:40:57 -05:00
committed by david
parent f32c4ca97d
commit 6e33a1ff9c

View File

@@ -885,6 +885,7 @@ class Rma(models.Model):
def _prepare_picking(self, picking_form):
picking_form.origin = self.name
picking_form.partner_id = self.partner_shipping_id
picking_form.location_id = self.partner_shipping_id.property_stock_customer
picking_form.location_dest_id = self.location_id
with picking_form.move_ids_without_package.new() as move_form:
move_form.product_id = self.product_id