Any assistance you can provide would be greatly appreciated
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Kế toán
- Tồn kho
- PoS
- Project
- MRP
Câu hỏi này đã bị gắn cờ
Hi,
You can create an option for cancelling by creating a custom module using below code
in .xml
<record id="view_sale_order_tree_button_inherit" model="ir.ui.view">
<field name="name">sale.order.tree.button.inherit</field>
<field name="model">sale.order</field>
<field name="inherit_id" ref="sale.view_quotation_tree_with_onboarding"/>
<field name="arch" type="xml">
<xpath expr="//tree" position="inside">
<header>
<button name="multiple_sale_order_cancel" type="object" string="Cancel Order"
class="btn btn-primary d-inline-flex align-items-center pl-0 px-lg-2 py-0 mb-0 ml-2"/>
</header>
</xpath>
</field>
</record>
in .py
def multiple_sale_order_cancel(self):
for rec in self:
rec.action_cancel()
By adding this accordingly the cancel button will be visible in the model tree view.
this is also applicable for other models and other functionalities like mass confirmation, etc. but should care for the function name that wrote inside the python function.
Don't forget to add the python files in the __init__.py and the XML files in the __manifest__.py obviously.
Regards
The below free module allows you to cancel multiple sale orders. it's available for Odoo 14, 13, 12. If you are using another version, you need to upgrade it if needed.
Bạn có hứng thú với cuộc thảo luận không? Đừng chỉ đọc, hãy tham gia nhé!
Tạo tài khoản ngay hôm nay để tận hưởng các tính năng độc đáo và tham gia cộng đồng tuyệt vời của chúng tôi!
Đăng kýBài viết liên quan | Trả lời | Lượt xem | Hoạt động | |
---|---|---|---|---|
|
0
thg 3 15
|
3393 | ||
|
1
thg 5 25
|
982 | ||
|
2
thg 11 24
|
2187 | ||
|
4
thg 2 24
|
12332 | ||
sale / delivery
Đã xử lý
|
|
1
thg 1 24
|
1675 |