Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odpovědět
2874 Zobrazení

Hi all,

We make custom products. The pricing of each product is based on the BoM cost structure.

I would like to make it easier for staff by adding a link on the SO form view that takes them to the BoM page (just the list view of BoMs) so they can build a BoM. Ideally this will show the breadcrumbs so that they can easily click back to the correct SO to add the product to the SO lines.

How can I add a link to BoMs on SO form view? (pref with breadcrumbs)

I hope this is clear enough. Please ask if you need me to clarify.

We are using Odoo v15 SaaS so a Studio based solution is heavily preferred.

Regards,

Lucas

Avatar
Zrušit
Nejlepší odpověď

Your Odoo Implementation Consultant or an Odoo Partner can help you here since this is a technical process not yet supported by Odoo Studio.


1. Create a Server Action like this:


action = {
"name": "Bills of Materials",
"type": "ir.actions.act_window",
"res_model": "mrp.bom",
"view_mode": "tree",
}


Note: After saving this Server Action, take a note of the ID (which you can find in the URL).  In this case it was 1566 but on your database it will be different.


2. Create a View that overrides the standard Sales Order View and adds a button linking to the ID of the Server Action. 



Note: there are several Views with the name sale.order.form, just choose the first one in the list when you search for it.


You then get a button looking like this in the corner of the Sales Order...


... that lets Users click it (after filling at least the Customer) and see all Bills of Materials:


Note:  you need to be in Developer Mode to access the Server Action and Views Menus. This is possible to implement in both of our hosted deployments of Odoo - Online (Saas) and Odoo.sh (Private Cloud).

Avatar
Zrušit
Autor

Perfect solution, thanks Ray!

Hi Ray,

Thank you for this solution. Is it possible to take this one step further and achieve the following below?

1) Instead of showing all Bill of Materials, only show the Bill Of Materials used in the sales order line.
2) Click the Bill of Material product to go into the Bill of Material page to see the BoM components?

Sorry but I don't understand your question. Please contact your Odoo advisor or the Partner supporting you, or post a new question with more details (pretend people have no idea what you mean) and the Community might answer you if they understand.

Related Posts Odpovědi Zobrazení Aktivita
0
říj 25
950
3
říj 25
479
1
zář 25
580
2
zář 25
677
3
zář 25
702