[FIX] account: in dashboard split menu invoices&refund in two distinct menu
This commit is contained in:
@@ -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 & Refunds</span>
|
||||
<span t-if="journal_type == 'purchase'">Bills & 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>
|
||||
|
||||
Reference in New Issue
Block a user