Purpose ======= Make them consistent. Make sure context is correctly set. Prevent creation when necessary. Specification ============= See https://www.odoo.com/web#id=2024467&action=333&active_id=1251&model=project.task&view_type=form&menu_id=4720 for the detailed list of all the requested improvements. TaskID: 2024467 closes odoo/odoo#34561 Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
30 lines
1.4 KiB
XML
30 lines
1.4 KiB
XML
<?xml version="1.0"?>
|
|
<odoo>
|
|
<data>
|
|
|
|
<!-- Add creditcard to res.partner -->
|
|
<record id="view_partners_form_payment_defaultcreditcard" model="ir.ui.view">
|
|
<field name="name">view.res.partner.form.payment.defaultcreditcard</field>
|
|
<field name="model">res.partner</field>
|
|
<field name="inherit_id" ref="base.view_partner_form"/>
|
|
<field name="priority" eval="15"/>
|
|
<field name="arch" type="xml">
|
|
<div name="button_box" position="inside">
|
|
<button type="action" class="oe_stat_button"
|
|
icon="fa-credit-card"
|
|
name="%(payment.payment_token_action)d"
|
|
context="{'search_default_partner_id': active_id, 'create': False, 'edit': False}"
|
|
attrs="{'invisible': [('payment_token_count', '=', 0)]}">
|
|
<div class="o_form_field o_stat_info">
|
|
<span class="o_stat_value">
|
|
<field name="payment_token_count" widget="statinfo" nolabel="1"/>
|
|
</span>
|
|
<span class="o_stat_text">Credit Cards</span>
|
|
</div>
|
|
</button>
|
|
</div>
|
|
</field>
|
|
</record>
|
|
</data>
|
|
</odoo>
|