mirror of
https://github.com/OCA/account-reconcile.git
synced 2025-01-20 12:27:39 +02:00
[IMP] account_partner_reconcile: splits the button 'Match payments'
Splits the button 'Match payments' to 'Match Receivables' and 'Match Payables', as the previous button was just now working.
This commit is contained in:
committed by
jcoux
parent
5179f04f38
commit
41637a12f5
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
{
|
{
|
||||||
'name': "Account Partner Reconcile",
|
'name': "Account Partner Reconcile",
|
||||||
'version': '12.0.1.0.0',
|
'version': '12.0.1.0.1',
|
||||||
'category': 'Accounting',
|
'category': 'Accounting',
|
||||||
'author': 'Eficent,'
|
'author': 'Eficent,'
|
||||||
'Odoo Community Association (OCA), ',
|
'Odoo Community Association (OCA), ',
|
||||||
|
|||||||
@@ -10,13 +10,15 @@ class ResPartner(models.Model):
|
|||||||
|
|
||||||
@api.multi
|
@api.multi
|
||||||
def action_open_reconcile(self):
|
def action_open_reconcile(self):
|
||||||
# Open reconciliation view for customers
|
# Open reconciliation view for customers and suppliers
|
||||||
accounts = self.env['account.account']
|
reconcile_mode = self.env.context.get('reconcile_mode', False)
|
||||||
accounts += (self.property_account_receivable_id +
|
accounts = self.property_account_payable_id
|
||||||
self.property_account_payable_id)
|
if reconcile_mode == 'customers':
|
||||||
|
accounts = self.property_account_receivable_id
|
||||||
|
|
||||||
action_context = {'show_mode_selector': True,
|
action_context = {'show_mode_selector': True,
|
||||||
'partner_ids': [self.id, ],
|
'partner_ids': [self.id, ],
|
||||||
|
'mode': reconcile_mode,
|
||||||
'account_ids': accounts.ids}
|
'account_ids': accounts.ids}
|
||||||
return {
|
return {
|
||||||
'type': 'ir.actions.client',
|
'type': 'ir.actions.client',
|
||||||
|
|||||||
@@ -13,7 +13,13 @@
|
|||||||
<div name="button_box" position="inside">
|
<div name="button_box" position="inside">
|
||||||
<button class="oe_stat_button" type="object"
|
<button class="oe_stat_button" type="object"
|
||||||
name="action_open_reconcile"
|
name="action_open_reconcile"
|
||||||
icon="fa-usd" string="Match payments">
|
context="{'reconcile_mode': 'customers'}"
|
||||||
|
icon="fa-usd" string="Match Receivables">
|
||||||
|
</button>
|
||||||
|
<button class="oe_stat_button" type="object"
|
||||||
|
name="action_open_reconcile"
|
||||||
|
context="{'reconcile_mode': 'suppliers'}"
|
||||||
|
icon="fa-usd" string="Match Payables">
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</field>
|
</field>
|
||||||
|
|||||||
Reference in New Issue
Block a user