|
|
@ -57,8 +57,12 @@ class InvoiceStockMove(models.Model): |
|
|
|
track_visibility='onchange', copy=False) |
|
|
|
|
|
|
|
def action_stock_move(self): |
|
|
|
if not self.picking_type_id: |
|
|
|
raise UserError(_( |
|
|
|
" Please select a picking type")) |
|
|
|
for order in self: |
|
|
|
if not self.invoice_picking_id: |
|
|
|
pick = {} |
|
|
|
if self.picking_type_id.code == 'outgoing': |
|
|
|
pick = { |
|
|
|
'picking_type_id': self.picking_type_id.id, |
|
|
@ -97,13 +101,6 @@ class InvoiceStockMove(models.Model): |
|
|
|
result['res_id'] = pick_ids or False |
|
|
|
return result |
|
|
|
|
|
|
|
def action_post(self): |
|
|
|
if not self.picking_type_id : |
|
|
|
raise UserError(_( |
|
|
|
" Please select a picking type")) |
|
|
|
res = super(InvoiceStockMove, self).action_post() |
|
|
|
return res |
|
|
|
|
|
|
|
def _reverse_moves(self, default_values_list=None, cancel=False): |
|
|
|
''' Reverse a recordset of account.move. |
|
|
|
If cancel parameter is true, the reconcilable or liquidity lines |
|
|
|