[FIX] account: in dashboard split menu invoices&refund in two distinct menu

This commit is contained in:
Cedric Snauwaert
2016-01-08 17:01:01 +01:00
parent d6b9c21c16
commit 4bb147b0f5
2 changed files with 10 additions and 3 deletions
@@ -292,6 +292,7 @@ class account_journal(models.Model):
model, action_id = ir_model_obj.get_object_reference(self._cr, self._uid, 'account', action_name)
action = self.pool[model].read(self._cr, self._uid, action_id, context=self._context)
action['context'] = ctx
action['domain'] = self._context.get('use_domain', [])
return action
@api.multi
@@ -111,9 +111,15 @@
<span>View</span>
</div>
<div>
<a type="object" name="open_action">
<span t-if="journal_type == 'sale'">Invoices &amp; Refunds</span>
<span t-if="journal_type == 'purchase'">Bills &amp; Refunds</span>
<a type="object" name="open_action" context="{'use_domain': [('type','in',('out_invoice','in_invoice'))]}">
<span t-if="journal_type == 'sale'">Invoices</span>
<span t-if="journal_type == 'purchase'">Bills</span>
</a>
</div>
<div>
<a type="object" name="open_action" context="{'use_domain': [('type','in',('out_refund','in_refund'))]}">
<span t-if="journal_type == 'sale'">Refunds</span>
<span t-if="journal_type == 'purchase'">Refunds</span>
</a>
</div>
<div>