Repository navigation
[18.0][FIX] enable document reference link generation - #609
Conversation
|
Hi @etobella, |
|
TEsts are failing and use a proper commit description |
481ab4f to
9dc26a2
Compare
|
@etobella Tests have been fixed |
9dc26a2 to
d1f40cf
Compare
| self.page1.content = Markup("<p></p>") | ||
| self.assertEqual(self.page1.content_parsed, Markup("<p></p>")) | ||
| self.page1.content = Markup("<p>{{r2}}</p>") | ||
| self.page1._compute_content_parsed() |
There was a problem hiding this comment.
You shouldn't need to execute compute functions
There was a problem hiding this comment.
You're right. Will remove unnecessary lines
|
|
||
|
|
||
| class TestDocumentReference(BaseCommon): | ||
| class TestDocumentReference(TransactionCase): |
There was a problem hiding this comment.
Why did you change it back to Transactioncase? wasn't BaseCommon working?
There was a problem hiding this comment.
Yes, I was getting not-null constraint error: null value in column "autopost_bills" of relation "res_partner" violates not-null constraint when using BaseCommon. With TransactionCase it works.
There was a problem hiding this comment.
That probably happens because you installed several modules and this was providing a problem with that. LEave it as it was please 🙏
There was a problem hiding this comment.
Changed this back to BaseCommon. Thank you
Before this change, adding reference to another document with {{SOME_REF}} won't transform this to a link as described in README. Now after saving the document with valid reference, it will be shown as a link to related document.
d1f40cf to
043e37c
Compare
|
I tested the latest commit successfully. |
|
/ocabot merge patch |
|
What a great day to merge this nice PR. Let's do it! |
|
Congratulations, your PR was merged at f428b8f. Thanks a lot for contributing to OCA. ❤️ |
Currently, the document PDF report outputs raw HTML. This fix returns functionality which was used before merging PR OCA#609 and aims to resolve report generation issues. fix page printing of HTML code
Currently, the document PDF report outputs raw HTML. This fix returns functionality which was used before merging PR OCA#609 and aims to resolve report generation issues.
No OCA pull request for 20.0 exists. The history above is the head of OCA#626 ([19.0][MIG] document_page_reference, open, approved twice, supersedes OCA#589) replayed with git format-patch and git am, followed by the 18.0 commits that OCA#626 does not contain yet (fix OCA#609 for reference links in the content, the report fix and the fr, gl and sl translations), cherry-picked with their authors. Model, tests and translations now match the static Oros port, which came from 18.0. View and widget keep the 19.0 fixes of OCA#626, which the port lacks. * Odoo 20 renamed BaseModel.get_formview_action() to get_record_default_action(). The override moves to the new name and get_formview_action() stays as an alias, because the reference links call it over RPC. The port built the action by hand instead. * Owl 3 has no useExternalListener any more. The widget uses useListener, which also removes the listener when the field is destroyed. * reference is copy=False. Otherwise copying a page fails on the unique reference (test_page_copy of document_page fails with this module installed). Taken from the port. * Tests: BaseCommon in 20.0 runs each test as a user with only base.group_user. The tests keep the superuser environment of 19.0 with _test_user_groups = (). Taken from the port.
Currently referencing other documents with {{SOME_REF}} won't result in showing this as a link.
This PR addresses with issue and allows showing link after saving the document.