Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
11 Ответы
10533 Представления

It's very common for companies to place a purchase order for every sales order line, and Odoo handles this well.  The problem is that users have to remember to select the "Buy" and "Make to Order" routes when creating products.

Because the list of routes is not fixed these are not standard fields that can be defaulted in the normal way.   It is possible to correct the data using download and upload, but that's not a great solution because users may create a new product and then place (and confirm) a sale order immediately.

I tried "Automated Actions" but without any success.  Any suggestions?  [Odoo11 Enterprise]

Аватар
Отменить
Автор

I can't comment on Pinakin's suggestion, but it works!! I hadn't seen this option because the user needs to be authorized to "Manage Push and Pull inventory flows".

Лучший ответ

you may set the routes on Product category or warehouse level so it applies automatically and no need to manually select everytime.

Аватар
Отменить
Автор

Thanks, this works!

Hi Pinakin Nayi (pna)

Can you send me your solution to make products to be "Buy" and "Make to Order" to checked in default, when you create a new products please.

Лучший ответ

While setting routes on categories is definitely useful, it doesn't allow products to share a category and use different routes.  I was able to set "make to order" and "buy" as defaults for new products without changing available routes on other products in the same category by adding a rule in Settings > Technical > User-defined defaults.  The trick is to look up the database id of the route(s) you want to set as default.  For my purpose, I set a rule with Name: route_ids, Model Name: product.template, and Default value: [5, 1].  Now, new products default to "make to order" and "buy" when added on the fly, but if a product is added that should not have "make to order", it can be deselected manually even if it belongs to the same category as other "make to order" products.

Аватар
Отменить
Автор

Thanks Michael! I've only just found your answer, but it's very useful. I have documented this here for reference: https://odootricks.tips/automated-action-to-set-routes/

Лучший ответ

Hello Jaydeep, 


Could you send me you python code please ?

Regards,

Аватар
Отменить
Лучший ответ

activate developer mode with assets, go to the product template form and tick the buy and make to order box. in the top right corner, click the 'Bug' button and select 'set defaults' from there you can select the fields you have changed and set their current values to be the default values when you create another product.

Аватар
Отменить
Автор

I did try this before, but Route is not one of the fields in the "drop down" that can be selected for default values (I think it's because the list of routes is dynamic). I just tried again, with the same result.

ah, you are correct, i have just double checked!

Лучший ответ

Hi Chris Tringham,

I tried with "Automated Actions". It's working well.

Create "Automated Actions" with Trigger Condition "Based on Form Modification".

Аватар
Отменить

Hi Jaydeep Barot,

Can you send me your solution to make products to be "Buy" and "Make to Order" to checked in default, when you create a new products please.

Related Posts Ответы Просмотры Активность
0
мар. 17
3385
1
мая 16
4825
0
февр. 16
3517
1
мая 25
989
0
мая 25
867