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

In v7 and later, is there a module to chain product addition in sale orders. That is, if you add a given product, the software automaticaly add others, or at least inform the user that it probably add some other products and offer a button to do so.

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

Have you seen https://www.openerp.com/apps/7.0/nan_product_pack/ ?

Allows configuring products as a collection of other products. If such a product is added in a sale order, all the products of the pack will be added automatically (when storing the order) as children of the pack product.

The module has been made compatible with nan_external_prices and containts code to specifically handle when the module is available but they're still independent and there are no dependencies between them.

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

It does the job out of the box. In sale order, you just have to select the product pack then click update. Not having to click update button would be an design improvement to my mind, but the same can be said for the total amount which isn't automaticaly updated in the default sale order.

Лучший ответ

You could try this module product_bundle

Description from __openerp__.py:

This allow you to create bundle product, which is a product containing other products.

Example: "Drinks Set"

1 Apple Juice
1 Orange Juice
1 Grape Juice

On the Sale Order will appear "Drinks Set", and on the Packing list will appear the detail of the Bundle. You can replace one of the item in the Bundle in the Delivery Order, eg: replace 1 Orange Juice by 1 Mandarin Orange Juice.

When defining your Bundle product, you can specify the revenue repartition within the bundle items. This addon doesn't use the BoM, so no MO generated.

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

In test I conducted, while I was able to enable bundle as supply method and fill the new page in the product form I didn't notice any specific change in the sale oder form.

The change as stated in the module description is in the Packing List (and possibly in the delivery Order. but i didn't test it)

Автор

Looking at the code, a sale_view.xml is present, but it's not even loaded by the module (using revision 36). Trying to load it will fail as the xml is relying on fields which are not present in the python sale order model. It looks like this functions where droped while making changes for v7 compatiibility

You are right, the sale_view.xml is not loaded ( There must be a reason, or is it just an oversight?). Try to add it to update_xml to see if it works, if not just comment it.

Автор

I already tried, but the addition will fail as the sale_view.xml relies on a 'so_line_item_set_ids' field which is not declared in sale.py.

It seems like an unfinished upgrade to V7.0. Could you take a look at https://www.openerp.com/apps/6.0/sale_bundle_product/ , it's for V6.0 and not usable in V7.0 cause there is a patch, but try to compare the files !!! especially sale.py and sale_view.xml, in sale.py you will find that 'so_line_item_set_ids' is defined. Both modules seem based on the same work.

Related Posts Ответы Просмотры Активность
3
июн. 25
2553
0
мая 24
1683
1
мар. 24
1607
1
янв. 24
2236
1
янв. 24
1525