13.0 finaliza ok
This commit is contained in:
parent
459d99a7c3
commit
35f5712918
25 changed files with 4 additions and 2275 deletions
|
@ -71,7 +71,7 @@ class ResPartner(models.Model):
|
|||
return super().write(vals)
|
||||
|
||||
def make_liquidation_buy(self, context = None):
|
||||
invoice_obj = self.env['account.invoice']
|
||||
invoice_obj = self.env['account.move']
|
||||
search_vals = [
|
||||
('location_id', '=', self.deposit_buy_location_id.id),'|',
|
||||
('location_dest_id', '=', self.env.ref('stock.stock_location_customers').id),
|
||||
|
@ -110,11 +110,11 @@ class ResPartner(models.Model):
|
|||
'invoice_line_ids': product_list,
|
||||
'company_id': self.company_id.id,
|
||||
})
|
||||
invoice = self.env['account.invoice'].create(invoice_vals)
|
||||
invoice = invoice_obj.create(invoice_vals)
|
||||
views = [(self.env.ref('account.invoice_form').id, 'form')]
|
||||
return {
|
||||
'type': 'ir.actions.act_window',
|
||||
'res_model': 'account.invoice',
|
||||
'res_model': 'account.move',
|
||||
'res_id': invoice.id,
|
||||
'target': 'current',
|
||||
'views': views,
|
||||
|
@ -134,7 +134,7 @@ class ResPartner(models.Model):
|
|||
stock_lines = self.env['stock.quant'].search(search_vals)
|
||||
product_list = []
|
||||
for mv in stock_lines:
|
||||
if mv.quantity > 0:
|
||||
if mv.quantity > 0:
|
||||
product_list.append([0, False, {
|
||||
'product_id': mv.product_id.id,
|
||||
'product_uom_qty': mv.quantity,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue