mirror of
https://github.com/bringout/oca-ocb-core.git
synced 2026-04-23 08:52:00 +02:00
19.0 vanilla
This commit is contained in:
parent
d1963a3c3a
commit
2d3ee4855a
7430 changed files with 2687981 additions and 2965473 deletions
|
|
@ -13,7 +13,7 @@ class AccountAnalyticAccount(models.Model):
|
|||
def _compute_purchase_order_count(self):
|
||||
for account in self:
|
||||
account.purchase_order_count = self.env['purchase.order'].search_count([
|
||||
('order_line.invoice_lines.analytic_line_ids.account_id', '=', account.id)
|
||||
('order_line.invoice_lines.analytic_line_ids.account_id', 'in', account.ids)
|
||||
])
|
||||
|
||||
def action_view_purchase_orders(self):
|
||||
|
|
@ -26,7 +26,7 @@ class AccountAnalyticAccount(models.Model):
|
|||
"res_model": "purchase.order",
|
||||
"domain": [['id', 'in', purchase_orders.ids]],
|
||||
"name": _("Purchase Orders"),
|
||||
'view_mode': 'tree,form',
|
||||
'view_mode': 'list,form',
|
||||
}
|
||||
if len(purchase_orders) == 1:
|
||||
result['view_mode'] = 'form'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue