In Odoo 14, how do I add a warning message to an invoice where the "Update Taxes" button has not been clicked from the internal view?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- ลูกค้าสัมพันธ์
- e-Commerce
- ระบบบัญชี
- สินค้าคงคลัง
- PoS
- Project
- MRP
คำถามนี้ถูกตั้งค่าสถานะ
1494
มุมมอง
สนุกกับการพูดคุยนี้ใช่ไหม? เข้าร่วมเลย!
สร้างบัญชีวันนี้เพื่อเพลิดเพลินไปกับฟีเจอร์พิเศษและมีส่วนร่วมกับคอมมูนิตี้ที่ยอดเยี่ยมของเรา!
ลงชื่อRelated Posts | ตอบกลับ | มุมมอง | กิจกรรม | |
---|---|---|---|---|
|
2
ก.พ. 23
|
5456 | ||
|
6
ม.ค. 19
|
4008 | ||
|
0
เม.ย. 23
|
1765 | ||
|
2
พ.ย. 23
|
1267 | ||
|
2
ก.ย. 24
|
4261 |
Hello,
I would suggest the following:
Invoice cannot be posted unless update Taxes is clicked.
To do so, simply add a boolean field, by default it's False.
Then in your Update taxes, update its value to True.
Then in Posted Action, say:
If my bool is False: then display message like "Please Update taxes before posting the invoice"..
def action_posted_or_whatever_the_name_is(..):
if not my_boolean:
raise UserError(...)
return super(AccoutnMove, self).action_posted_or_whatever_the_name_is(..)
def Your_update_taxe_func(..):
// your code
your_invoice_variable.my_boolean = True
This is if you want to have A visible message to display.
But if you want to update taxes directly, you can call "Your_update_taxe_func" in the 'action_posted_or_whatever_the_name_is':
def action_posted_or_whatever_the_name_is(..):
self.Your_update_taxe_func()
return super(...).action_posted_or_whatever_the_name_is(..)
Hope this helps.