'Returns a dictionary of values that will be used to create a stock move from a procurement.
This function assumes that the given procurement has a rule (action == \'move\') set on it.
:param procurement: browse record
:rtype: dictionary'

def _get_stock_move_values(self):

    group_id = False
    if (self.rule_id.group_propagation_option == 'propagate'):
        group_id = self.group_id.id
    elif (self.rule_id.group_propagation_option == 'fixed'):
        group_id = self.rule_id.group_id.id
    date_expected = (datetime.strptime(self.date_planned, DEFAULT_SERVER_DATETIME_FORMAT) - relativedelta(days=(self.rule_id.delay or 0))).strftime(DEFAULT_SERVER_DATETIME_FORMAT)
    qty_done = sum(self.move_ids.filtered((lambda move: (move.state == 'done'))).mapped('product_uom_qty'))
    qty_left = max((self.product_qty - qty_done), 0)
    return {'name': self.name, 'company_id': (self.rule_id.company_id.id or self.rule_id.location_src_id.company_id.id or self.rule_id.location_id.company_id.id or self.company_id.id), 'product_id': self.product_id.id, 'product_uom': self.product_uom.id, 'product_uom_qty': qty_left, 'partner_id': (self.rule_id.partner_address_id.id or (self.group_id and self.group_id.partner_id.id) or False), 'location_id': self.rule_id.location_src_id.id, 'location_dest_id': self.location_id.id, 'move_dest_id': ((self.move_dest_id and self.move_dest_id.id) or False), 'procurement_id': self.id, 'rule_id': self.rule_id.id, 'procure_method': self.rule_id.procure_method, 'origin': self.origin, 'picking_type_id': self.rule_id.picking_type_id.id, 'group_id': group_id, 'route_ids': [(4, route.id) for route in self.route_ids], 'warehouse_id': (self.rule_id.propagate_warehouse_id.id or self.rule_id.warehouse_id.id), 'date': date_expected, 'date_expected': date_expected, 'propagate': self.rule_id.propagate, 'priority': self.priority}
