Merge pull request #721 from expsa/dev_odex25_accounting
Dev odex25 accounting
This commit is contained in:
commit
fbe78e665f
|
|
@ -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