[10.0] [MIG] website_legal_page - #353
Conversation
OCA Transbot updated translations from Transifex
aaeaf4b to
acd5fab
Compare
| website=True, | ||
| ) | ||
| def show_legal_page(self, **kwargs): | ||
| return self.page('website_legal_page.%s' % page, kwargs) |
There was a problem hiding this comment.
This will fail! page is undefined.
| </template> | ||
|
|
||
| <template id="website.legal" name="Legal advice" page="True"> | ||
| <template id="legal" name="Legal Advice" page="True"> |
There was a problem hiding this comment.
id should be advice instead, as in line 9
| </template> | ||
|
|
||
| <template id="website.privacy" name="Privacy policy" page="True"> | ||
| <template id="privacy" name="Privacy Policy" page="True"> |
There was a problem hiding this comment.
ID here must be privacy-policy, like in line 9
| </template> | ||
|
|
||
| <template id="website.terms" name="Terms of use" page="True"> | ||
| <template id="terms" name="Terms of use" page="True"> |
| response = self.url_open('/legal/no-page') | ||
| self.assertEqual( | ||
| response.getcode(), | ||
| 404, |
There was a problem hiding this comment.
It would be nice to add a test like this for just /legal
|
|
||
| def test_privacy(self): | ||
| """ It should return a 200 for a defined page. """ | ||
| response = self.url_open('/legal/privacy') |
There was a problem hiding this comment.
It would be nice to add a test like this for each of the 3 pages.
BTW, you said it would be privacy-policy instead. Check below.
|
Hah bots are part of the reason that I just took the PR over - I obviously tested nothing! Fixed. |
5e3d9dc to
3e6ff23
Compare
yajo
left a comment
There was a problem hiding this comment.
OK, it seems good enough for me 😊
However, I still want to add a couple of warnings we might want to fix now:
- Current design of pages will hit odoo/odoo#15437.
- Changing XMLIDS of legal pages will make old ones disappear and new ones get new. I'm pretty sure many people will not want to reach their lawyers again to re-fix their lost legal terms, so a migration script from <10.0 versions would be very desirable.
|
Hmmm I'm not sure I totally understand the number 1 point. What do I need to do here in order to avoid that? Regarding the migration script - isn't that better suited for OpenUpgrade? |
|
In this case I don't think we should provide separate views for "content containers", as someone may want to modify the entire legal page without keeping the default layout. |
Yes, @pedrobaeza, but just in case @lasley wants to avoid that: just replace those |
* Move legal pages to explicit /legal routes Fixes by PR review Fix my obvious lack of testing
- Update copyright headers. - Update copyright holders data. - Remove .pot file. - Add migration script.
3e6ff23 to
37bf49a
Compare
|
@lasley I took the freedom to squash your last commits to get it ready to merge. I also added the required migration script, so this should be ready to merge now. |
- Privacy policy URL changed. - Contributors data updated. - Move templates to templates folder, as per guidelines.
|
Merging then |
- Privacy policy URL changed. - Contributors data updated. - Move templates to templates folder, as per guidelines.
|
You're awesome, thanks @yajo! Been backed up with the deploys and totally wasn't able to get back to this. Excellent community effort! |
|
Anyone interested on this please take a look at #358 |
- Privacy policy URL changed. - Contributors data updated. - Move templates to templates folder, as per guidelines.
- Privacy policy URL changed. - Contributors data updated. - Move templates to templates folder, as per guidelines.
- Privacy policy URL changed. - Contributors data updated. - Move templates to templates folder, as per guidelines.
- Privacy policy URL changed. - Contributors data updated. - Move templates to templates folder, as per guidelines.
- Privacy policy URL changed. - Contributors data updated. - Move templates to templates folder, as per guidelines.
- Privacy policy URL changed. - Contributors data updated. - Move templates to templates folder, as per guidelines.
- Privacy policy URL changed. - Contributors data updated. - Move templates to templates folder, as per guidelines.
- Privacy policy URL changed. - Contributors data updated. - Move templates to templates folder, as per guidelines.
- Privacy policy URL changed. - Contributors data updated. - Move templates to templates folder, as per guidelines.
- Privacy policy URL changed. - Contributors data updated. - Move templates to templates folder, as per guidelines.
- Privacy policy URL changed. - Contributors data updated. - Move templates to templates folder, as per guidelines.
- Privacy policy URL changed. - Contributors data updated. - Move templates to templates folder, as per guidelines.
- Privacy policy URL changed. - Contributors data updated. - Move templates to templates folder, as per guidelines.
I didn't want to keep submitting PRs to an edge branch, so I'm superseding #310 with this.
@yajo - I completed your #310 (review) in 8f3c7b2, which I will squash into 311c6ca before merge.