add budget confirm code
This commit is contained in:
parent
556ce74613
commit
10df0cf990
|
|
@ -83,7 +83,7 @@ class CrossoveredBudgetLines(models.Model):
|
|||
for rec in self:
|
||||
orders = self.env['purchase.order.line'].search(
|
||||
[('account_analytic_id', '=', rec.analytic_account_id.id),
|
||||
('order_id.state', 'in', ['purchase'])]).mapped('order_id')
|
||||
('order_id.state', 'in', ['purchase','done'])]).mapped('order_id')
|
||||
total_orders = sum(orders.mapped('amount_total'))
|
||||
invoiced = self.env['account.move'].search(
|
||||
[('purchase_id', 'in', orders.ids), ('state', 'not in', ['draft', 'cancel'])]).mapped('amount_total')
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ class CrossoveredBudgetLines(models.Model):
|
|||
for rec in self:
|
||||
orders = self.env['purchase.order.line'].search(
|
||||
[('account_analytic_id', '=', rec.analytic_account_id.id),
|
||||
('order_id.state', 'in', ['purchase'])]).mapped('order_id')
|
||||
('order_id.state', 'in', ['purchase','done'])]).mapped('order_id')
|
||||
total_orders = sum(orders.mapped('amount_total'))
|
||||
invoiced = self.env['account.move'].search(
|
||||
[('purchase_id', 'in', orders.ids), ('state', 'not in', ['draft', 'cancel'])]).mapped('amount_total')
|
||||
|
|
|
|||
Loading…
Reference in New Issue