When I have a Customer record like this:
When I click a Contact I get this popup:
I want to open the Contact record itself, not have it popup like that. Is this possible?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
When I have a Customer record like this:
When I click a Contact I get this popup:
I want to open the Contact record itself, not have it popup like that. Is this possible?
You can create a Smart Button like this:
Which when clicked shows the original Company plus all the Contacts:
Find the database id of the standard Window Action that open Customers:
Make your own View like this:
<div name="button_box" position="inside">
<button name="55" type="action" string="Contacts" icon="fa-users"
context="{'search_default_parent_id': active_id}"/>
</div>
Depending on how you want the Button to work, you might need to modify the context dictionary.
Hello Ray,
Since some time has passed I wanted to check with you to see if you feel this is still the best method to accomplish this. Does anything need to be updated for use with V17?
Thank you.
This works the same way for Odoo 17
Ray,
Would you mind expanding a bit for someone that is proficient in technical details but is an Odoo newbie trying to get a handle on the steps required to implement your solution.
I'm missing some step along the way.
Thanks in advance.
Ping my prior post from 14 days ago. 😁☝🏻
Please review https://www.odoo.com/forum/help-1/how-can-our-team-hold-and-release-delivery-orders-based-on-the-sales-order-273935 for more information, and if you still need help I suggest you contact your Odoo Advisor or Odoo Partner.
This approach is only for Advanced Odoo Users and you might need several hours of help customized to your skill level.
Hi,
Add a button with label Open in kanban view itself and in the button action open the record using the code like this,
Inherit the view like this:
<record id="view_partner_form_inherit" model="ir.ui.view">
<field name="name">res.partner.inherit</field>
<field name="model">res.partner</field>
<field name="inherit_id" ref="base.view_partner_form"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='child_ids']/kanban/templates//div[@class='oe_kanban_details']" position="after">
<button name="action_open" string="Open" type="object">Open</button>
</xpath>
</field>
</record>
and inside the corresponding model:
def action_open(self):
for rec in self:
return {
"type": "ir.actions.act_window",
"res_model": "res.partner",
"views": [[False, "form"]],
"res_id": rec.id,
}
Thanks
Cree una cuenta para poder utilizar funciones exclusivas e interactuar con la comunidad.
RegistrarsePublicaciones relacionadas | Respuestas | Vistas | Actividad | |
---|---|---|---|---|
|
1
feb 22
|
8499 | ||
|
0
mar 15
|
4591 | ||
|
2
mar 15
|
5927 | ||
|
1
feb 22
|
1371 | ||
|
0
dic 15
|
2896 |