[18.0][FIX] document_page_approval: Avoid errors when creating a page history and send mail#584
Conversation
19dfc28 to
971a862
Compare
971a862 to
96d3621
Compare
6479914 to
cc01f92
Compare
|
Can you be a bit more specific about the third step?
I'm not able to reproduce the error and assuming is because of this step. I went to mail_message and deleted the one linked to the Category |
I think an example is the best way to explain it. |
christian-ramos-tecnativa
left a comment
There was a problem hiding this comment.
Thanks a lot for the Gif, I was able to replicate and understand the error
…ry and send mail Example use case: - Modify the Odoo Features category, check Require approval, and set Approver group > Administration / Access Rights - Modify the Marc Demo user and define Document Knowledge > Editor permissions - Go to the Odoo Features category and, taking into account the ID, delete the mail_message record table with the same ID from the database - With the Marc Demo user, go to the Knowledge > Odoo Features menu and enter the Odoo 15.0 Functional Demo page (it is important to follow these specific steps) - Modify the page and save Before this change, an error could occur because the action https://github.com/OCA/knowledge/blob/0881d75a35e7fc2f814110df4878177e805e589b/document_page/views/document_page_category. xml#L83C17-L83C42 defined a default_parent_id=x (page category ID) if there was no mail_message linked to that category ID; now the value of default_parent_id is removed to avoid this specific error. TT61290
cc01f92 to
52b1c22
Compare
|
/ocabot merge patch |
|
On my way to merge this fine PR! |
|
Congratulations, your PR was merged at f747aa3. Thanks a lot for contributing to OCA. ❤️ |


Avoid errors when creating a page history and end mail
Example use case:
Before this change, an error could occur because the action https://github.com/OCA/knowledge/blob/0881d75a35e7fc2f814110df4878177e805e589b/document_page/views/document_page_category. xml#L83C17-L83C42 defined a default_parent_id=x (page category ID) if there was no mail_message linked to that category ID; now the value of default_parent_id is removed to avoid this specific error.
Please @pedrobaeza and @pilarvargas-tecnativa can you review it?
@Tecnativa TT61290