Chào chuyên gia,
Mình có tạo thử một Workflow đơn giản như: "Trong cùng phân hệ res.partner, nếu hệ thống Odoo kiểm tra thấy field_so_1 == True thì hệ thống sẽ gán field_so_2 = True". Nhưng em làm hoài không được, em đã tạo thử trong workflow, cũng đã thử trong Automation nhưng không có kết quả. Có lẽ mình còn thiếu cái gì đó nên không được, các bạn có thể gợi ý cho mình với.
Welcome!
This community is for professionals and enthusiasts of our products and services.
Share and discuss the best content and new marketing ideas, build your professional profile and become a better marketer together.
Hỏi cách tạo một Workflow đơn giản
Câu hỏi này đã bị gắn cờ
1
Trả lời
2910
Xem
Trường hợp này bạn có thể sử dụng thuộc tính compute để tự tính toán giá trị cho trường field_so_2 như sau
# khai bao field_so_2
field_so_2 = fields.Boolean(compute='_compute_field_so_2')
@api.depends('field_so_1')
def _compute_field_so_2(self):
for record in self:
record.field_so_2 = record.field_so_1