[IMP] account: replaced 'xxx Invoiced' button on res.partner by an action.
This goes along the add of a 'partner ledger' button in enterprise, so we also removed the related actions
This commit is contained in:
@@ -440,12 +440,3 @@ class ResPartner(models.Model):
|
||||
return super(ResPartner, self)._commercial_fields() + \
|
||||
['debit_limit', 'property_account_payable_id', 'property_account_receivable_id', 'property_account_position_id',
|
||||
'property_payment_term_id', 'property_supplier_payment_term_id', 'last_time_entries_checked']
|
||||
|
||||
def open_partner_history(self):
|
||||
'''
|
||||
This function returns an action that display invoices/refunds made for the given partners.
|
||||
'''
|
||||
action = self.env.ref('account.action_invoice_refund_out_tree')
|
||||
result = action.read()[0]
|
||||
result['domain'] = [('partner_id', 'in', self.ids)]
|
||||
return result
|
||||
|
||||
@@ -138,17 +138,10 @@
|
||||
<menuitem action="action_account_form" id="menu_action_account_form" parent="menu_finance_entries" sequence="20"/>
|
||||
|
||||
<act_window
|
||||
id="act_account_partner_ledger_payable"
|
||||
name="Partner Ledger: Payable"
|
||||
res_model="account.move.line"
|
||||
context="{'search_default_partner_id':[active_id], 'search_default_unreconciled':1, 'search_default_payable':1}"
|
||||
src_model="res.partner"/>
|
||||
|
||||
<act_window
|
||||
id="act_account_partner_ledger_receivable"
|
||||
name="Partner Ledger: Receivable"
|
||||
res_model="account.move.line"
|
||||
context="{'search_default_partner_id':[active_id], 'search_default_unreconciled':1, 'search_default_receivable':1}"
|
||||
id="account.action_all_partner_invoices"
|
||||
name="All Invoices"
|
||||
res_model="account.invoice"
|
||||
domain="[('partner_id', '=', active_id)]"
|
||||
src_model="res.partner"/>
|
||||
|
||||
<act_window
|
||||
|
||||
@@ -95,20 +95,6 @@
|
||||
<field name="priority" eval="20"/>
|
||||
<field name="groups_id" eval="[(4, ref('account.group_account_invoice'))]"/>
|
||||
<field name="arch" type="xml">
|
||||
<button name="toggle_active" position="before">
|
||||
<button type="object"
|
||||
class="oe_stat_button"
|
||||
id="invoice_button"
|
||||
icon="fa-pencil-square-o"
|
||||
name="open_partner_history"
|
||||
attrs="{'invisible': [('customer', '=', False)]}"
|
||||
context="{'default_partner_id': active_id}">
|
||||
<div class="o_form_field o_stat_info">
|
||||
<span class="o_stat_value"><field name="total_invoiced" widget='monetary' options="{'currency_field': 'currency_id'}"/></span>
|
||||
<span class="o_stat_text">Invoiced</span>
|
||||
</div>
|
||||
</button>
|
||||
</button>
|
||||
<group name="container_row_2" position="inside">
|
||||
<group string="Payments" name="banks">
|
||||
<field name="currency_id" invisible="1"/>
|
||||
@@ -126,7 +112,7 @@
|
||||
<group colspan="2" col="2" groups="account.group_warning_account">
|
||||
<separator string="Warning on the Invoice" colspan="4"/>
|
||||
<field name="invoice_warn" nolabel="1" />
|
||||
<field name="invoice_warn_msg" colspan="3" nolabel="1"
|
||||
<field name="invoice_warn_msg" colspan="3" nolabel="1"
|
||||
attrs="{'required':[('invoice_warn','!=','no-message')],'readonly':[('invoice_warn','=','no-message')]}"/>
|
||||
</group>
|
||||
</page>
|
||||
|
||||
Reference in New Issue
Block a user