From cc1d78a80b518bd5eaec7eb70d7bc14ec4c31275 Mon Sep 17 00:00:00 2001 From: Romain Derie <rde@odoo.com> Date: Mon, 13 May 2019 17:29:24 +0000 Subject: [PATCH] [IMP] *: correctly read/write website_published The `website_published` field from the website's mixins is basically a readonly from `is_published` field. On read, this field will simply read `is_published` and check if the record's website_id is accessible (only for the multi mixin). On write, it will always write on `is_published`. This commit improves a few things: - A lot of code was writting on website_published which was just then writting on is_published. Writting directly on is_published makes more sense. - Some backend fields would still reference `website_published` instead of `is_published` which would just go through the related for no reason. Plus, using `is_published` will make the field tooltip more accurate as we are not in a website context ('Visible on current website' to 'Is Published') - Filter and search on tree view were still using the `website_published` related field, which is just a readonly when we are not in a frontend context. - Some create and write function would have security check on `website_published` value but that was wrong as the user could bypass that by simply writting on `is_published`. For the write method, check `is_published` is more accurate as it will cover both case since `website_published` will then call the write method on `is_published` --- .../test_website/data/test_website_data.xml | 2 +- addons/website/data/website_data.xml | 6 +- addons/website/data/website_demo.xml | 4 +- addons/website/models/mixins.py | 1 - addons/website/tests/test_page.py | 4 +- addons/website/views/website_views.xml | 5 +- addons/website_blog/controllers/main.py | 2 +- .../website_blog/data/website_blog_demo.xml | 4 +- addons/website_blog/models/website_blog.py | 7 ++- .../data/res_partner_grade_demo.xml | 8 +-- .../data/res_partner_demo.xml | 8 +-- .../views/res_partner_views.xml | 4 +- addons/website_event/data/event_demo.xml | 14 ++--- .../website_event_track/data/event_demo.xml | 60 +++++++++---------- .../views/website_form_templates.xml | 2 +- .../data/hr_job_demo.xml | 6 +- .../website_hr_recruitment_templates.xml | 2 +- .../data/membership_demo.xml | 4 +- .../data/website_partner_data.xml | 4 +- .../data/website_partner_demo.xml | 26 ++++---- addons/website_rating/models/rating.py | 2 - addons/website_sale/data/demo.xml | 46 +++++++------- addons/website_sale/tests/test_customize.py | 4 +- addons/website_sale/views/product_views.xml | 2 +- .../data/website_sale_delivery_data.xml | 2 +- .../data/website_sale_delivery_demo.xml | 4 +- .../views/website_sale_delivery_views.xml | 4 +- .../data/product_demo.xml | 2 +- .../data/demo.xml | 2 +- .../data/website_sale_slides_demo.xml | 8 +-- .../data/website_sale_stock_demo.xml | 2 +- addons/website_slides/controllers/main.py | 8 +-- .../website_slides/data/gamification_data.xml | 10 ++-- .../data/slide_channel_demo.xml | 12 ++-- .../data/slide_channel_tag_demo.xml | 4 +- addons/website_slides/data/slide_data.xml | 4 +- .../website_slides/data/slide_slide_demo.xml | 32 +++++----- addons/website_slides/models/slide_channel.py | 4 +- addons/website_slides/models/slide_slide.py | 6 +- .../static/src/js/slides_upload.js | 2 +- addons/website_slides/tests/common.py | 4 +- addons/website_slides/tests/test_karma.py | 6 +- addons/website_slides/tests/test_security.py | 8 +-- .../website_slides/tests/test_statistics.py | 4 +- .../views/slide_channel_tag_views.xml | 9 ++- .../views/slide_slide_views.xml | 4 +- .../data/gamification_data.xml | 2 +- .../data/slide_slide_demo.xml | 4 +- .../test_course_certification_failure.py | 4 +- doc/howtos/website/course-product | 6 +- 50 files changed, 193 insertions(+), 191 deletions(-) diff --git a/addons/test_website/data/test_website_data.xml b/addons/test_website/data/test_website_data.xml index 05a248190d4d..37a0949f0bbb 100644 --- a/addons/test_website/data/test_website_data.xml +++ b/addons/test_website/data/test_website_data.xml @@ -69,7 +69,7 @@ </field> </record> <record id="test_page" model="website.page"> - <field name="website_published">True</field> + <field name="is_published">True</field> <field name="url">/test_page_view</field> <field name="view_id" ref="test_page_view"/> </record> diff --git a/addons/website/data/website_data.xml b/addons/website/data/website_data.xml index c1af4f0c9858..3f62209b8076 100644 --- a/addons/website/data/website_data.xml +++ b/addons/website/data/website_data.xml @@ -117,17 +117,17 @@ <data noupdate="1"> <record id="homepage_page" model="website.page"> - <field name="website_published">True</field> + <field name="is_published">True</field> <field name="url">/</field> <field name="view_id" ref="homepage"/> </record> <record id="contactus_page" model="website.page"> <field name="url">/contactus</field> - <field name="website_published">True</field> + <field name="is_published">True</field> <field name="view_id" ref="contactus"/> </record> <record id="aboutus_page" model="website.page"> - <field name="website_published">True</field> + <field name="is_published">True</field> <field name="url">/aboutus</field> <field name="view_id" ref="aboutus"/> </record> diff --git a/addons/website/data/website_demo.xml b/addons/website/data/website_demo.xml index daa3329fa32e..8efebf26764d 100644 --- a/addons/website/data/website_demo.xml +++ b/addons/website/data/website_demo.xml @@ -303,7 +303,7 @@ <!-- Showcase all (most?) BS components and utilities --> <record id="bs_debug_page" model="website.page"> <field name="url">/website/demo/bootstrap</field> - <field name="website_published">False</field> + <field name="is_published">False</field> <field name="view_id" ref="bs_debug_view"/> </record> @@ -311,7 +311,7 @@ <!-- Showcase all snippets --> <record id="snippets_debug_page" model="website.page"> <field name="url">/website/demo/snippets</field> - <field name="website_published">False</field> + <field name="is_published">False</field> <field name="view_id" ref="snippets_debug_view"/> </record> </data> diff --git a/addons/website/models/mixins.py b/addons/website/models/mixins.py index 11f9823c1ca6..e9c08d2c31db 100644 --- a/addons/website/models/mixins.py +++ b/addons/website/models/mixins.py @@ -146,7 +146,6 @@ class WebsitePublishedMixin(models.AbstractModel): @api.model_create_multi def create(self, vals_list): records = super(WebsitePublishedMixin, self).create(vals_list) - is_publish_modified = any('website_published' in values for values in vals_list) if is_publish_modified and not all(record.can_publish for record in records): raise AccessError(self._get_can_publish_error_message()) diff --git a/addons/website/tests/test_page.py b/addons/website/tests/test_page.py index 88f09bfc2edd..57088999132b 100644 --- a/addons/website/tests/test_page.py +++ b/addons/website/tests/test_page.py @@ -197,11 +197,11 @@ class Crawler(HttpCase): generic_page = Page.create({ 'view_id': base_view.id, 'url': '/page_1', - 'website_published': True, + 'is_published': True, }) specific_page = generic_page.copy({'website_id': self.env['website'].get_current_website().id}) - specific_page.write({'website_published': False, 'arch': generic_page.arch.replace('I am a generic page', 'I am a specific page')}) + specific_page.write({'is_published': False, 'arch': generic_page.arch.replace('I am a generic page', 'I am a specific page')}) r = self.url_open(specific_page.url) self.assertEqual(r.status_code, 404, "Restricted users should see a 404 and not the generic one as we unpublished the specific one") diff --git a/addons/website/views/website_views.xml b/addons/website/views/website_views.xml index fdab02120668..fa98035100a5 100644 --- a/addons/website/views/website_views.xml +++ b/addons/website/views/website_views.xml @@ -145,12 +145,11 @@ <field name="name"/> <field name="url"/> <field name="view_id" context="{'display_website': True}"/> - <field name="is_published" groups="base.group_no_one"/> <field name="website_id" options="{'no_create': True}" groups="website.group_multi_website"/> </group> <group> <field name="website_indexed"/> - <field name="website_published"/> + <field name="is_published"/> <field name="date_publish"/> </group> </group> @@ -170,7 +169,7 @@ <field name="url"/> <field name="website_id" groups="website.group_multi_website"/> <field name="website_indexed"/> - <field name="website_published" string="Page Published"/> + <field name="is_published" string="Page Published"/> <field name="create_uid" invisible="1"/> <field name="write_uid"/> <field name="write_date"/> diff --git a/addons/website_blog/controllers/main.py b/addons/website_blog/controllers/main.py index 1d09540e8cfe..0874169871d7 100644 --- a/addons/website_blog/controllers/main.py +++ b/addons/website_blog/controllers/main.py @@ -286,7 +286,7 @@ class WebsiteBlog(http.Controller): new_blog_post = request.env['blog.post'].create({ 'blog_id': blog_id, - 'website_published': False, + 'is_published': False, }) return werkzeug.utils.redirect("/blog/%s/post/%s?enable_editor=1" % (slug(new_blog_post.blog_id), slug(new_blog_post))) diff --git a/addons/website_blog/data/website_blog_demo.xml b/addons/website_blog/data/website_blog_demo.xml index bb9106206d02..f80c2bd782dd 100644 --- a/addons/website_blog/data/website_blog_demo.xml +++ b/addons/website_blog/data/website_blog_demo.xml @@ -15,7 +15,7 @@ <field name="subtitle">Ideas behind the Odoo communication tools.</field> <field name="blog_id" ref="blog_blog_1"/> <field name="tag_ids" eval="[(6, 0, [ref('blog_tag_1')])]"/> - <field name="website_published" eval="True"/> + <field name="is_published" eval="True"/> <field name="published_date" eval="time.strftime('%Y-%m-%d %H:%M:%S')"/> <field name="website_meta_keywords">Odoo, email</field> <field name="website_meta_description">Ideas behind the Odoo communication tools.</field> @@ -130,7 +130,7 @@ <field name="name">Integrating your CMS and E-Commerce</field> <field name="subtitle">Building your company's website and selling your products online easy.</field> <field name="blog_id" ref="blog_blog_1"/> - <field name="website_published" eval="True"/> + <field name="is_published" eval="True"/> <field name="published_date" eval="time.strftime('%Y-%m-%d %H:%M:%S')"/> <field name="tag_ids" eval="[(6, 0, [ref('blog_tag_1'), ref('blog_tag_2')])]"/> <field name="cover_properties">{"background-image": "url(/web/image/website_blog.blog_post_cover_02)", "resize_class": "cover container-fluid cover_full", "background-color": "oe_black", "opacity": "0.0"}</field> diff --git a/addons/website_blog/models/website_blog.py b/addons/website_blog/models/website_blog.py index 6bf40b32f630..6ec13d083709 100644 --- a/addons/website_blog/models/website_blog.py +++ b/addons/website_blog/models/website_blog.py @@ -194,7 +194,7 @@ class BlogPost(models.Model): blog_post._write(dict(post_date=blog_post.create_date)) # dont trigger inverse function def _check_for_publication(self, vals): - if vals.get('website_published'): + if vals.get('is_published'): for post in self: post.blog_id.message_post_with_view( 'website_blog.blog_post_template_new_post', @@ -214,9 +214,10 @@ class BlogPost(models.Model): result = True for post in self: copy_vals = dict(vals) - if ('website_published' in vals and 'published_date' not in vals and + published_in_vals = set(vals.keys()) & {'is_published', 'website_published'} + if (published_in_vals and 'published_date' not in vals and (not post.published_date or post.published_date <= fields.Datetime.now())): - copy_vals['published_date'] = vals['website_published'] and fields.Datetime.now() or False + copy_vals['published_date'] = vals[list(published_in_vals)[0]] and fields.Datetime.now() or False result &= super(BlogPost, self).write(copy_vals) self._check_for_publication(vals) return result diff --git a/addons/website_crm_partner_assign/data/res_partner_grade_demo.xml b/addons/website_crm_partner_assign/data/res_partner_grade_demo.xml index bce96651c147..c12607f0cbf4 100644 --- a/addons/website_crm_partner_assign/data/res_partner_grade_demo.xml +++ b/addons/website_crm_partner_assign/data/res_partner_grade_demo.xml @@ -2,16 +2,16 @@ <odoo> <data noupdate="1"> <record id="website_crm_partner_assign.res_partner_grade_platinium" model="res.partner.grade"> - <field name="website_published" eval="True" /> + <field name="is_published" eval="True" /> </record> <record id="website_crm_partner_assign.res_partner_grade_gold" model="res.partner.grade"> - <field name="website_published" eval="True" /> + <field name="is_published" eval="True" /> </record> <record id="website_crm_partner_assign.res_partner_grade_silver" model="res.partner.grade"> - <field name="website_published" eval="True" /> + <field name="is_published" eval="True" /> </record> <record id="website_crm_partner_assign.res_partner_grade_bronze" model="res.partner.grade"> - <field name="website_published" eval="True" /> + <field name="is_published" eval="True" /> </record> <record id="base.partner_demo_portal" model="res.partner"> <field name="grade_id" ref="website_crm_partner_assign.res_partner_grade_platinium"/> diff --git a/addons/website_customer/data/res_partner_demo.xml b/addons/website_customer/data/res_partner_demo.xml index 9bea8129a98d..3ab130b90914 100644 --- a/addons/website_customer/data/res_partner_demo.xml +++ b/addons/website_customer/data/res_partner_demo.xml @@ -3,7 +3,7 @@ <data noupdate="1"> <record id="base.res_partner_2" model="res.partner"> - <field name="website_published" eval="True"/> + <field name="is_published" eval="True"/> <field name="website_short_description">Deco Addict designs, develops, integrates and supports HR and Supply Chain processes in order to make our customers more productive, responsive and profitable.</field> <field name="website_description" type="xml"> <p> @@ -33,7 +33,7 @@ </field> </record> <record id="base.res_partner_3" model="res.partner"> - <field name="website_published" eval="True"/> + <field name="is_published" eval="True"/> <field name="website_short_description">A non-profit international educational and scientific organisation, hosting three departments (aeronautics and aerospace, environmental and applied fluid dynamics, and turbomachinery and propulsion).</field> <field name="website_description" type="xml"> <p> @@ -61,7 +61,7 @@ </field> </record> <record id="base.res_partner_4" model="res.partner"> - <field name="website_published" eval="True"/> + <field name="is_published" eval="True"/> <field name="website_short_description">Deco Addict designs, develops, integrates and supports HR and Supply Chain processes in order to make our customers more productive, responsive and profitable.</field> <field name="website_description" type="xml"> <p> @@ -91,7 +91,7 @@ </field> </record> <record id="base.res_partner_3" model="res.partner"> - <field name="website_published" eval="True"/> + <field name="is_published" eval="True"/> <field name="website_short_description">A non-profit international educational and scientific organisation, hosting three departments (aeronautics and aerospace, environmental and applied fluid dynamics, and turbomachinery and propulsion).</field> <field name="website_description" type="xml"> <p> diff --git a/addons/website_customer/views/res_partner_views.xml b/addons/website_customer/views/res_partner_views.xml index 5c2cf4bec825..e763f00ef8c1 100644 --- a/addons/website_customer/views/res_partner_views.xml +++ b/addons/website_customer/views/res_partner_views.xml @@ -22,7 +22,7 @@ <group col="4"> <field name="name"/> <field name="classname"/> - <field name="website_published"/> + <field name="is_published"/> <field name="active"/> </group> </sheet> @@ -37,7 +37,7 @@ <tree string="Website Tags" editable="bottom"> <field name="name"/> <field name="classname"/> - <field name="website_published"/> + <field name="is_published"/> <field name="active" invisible="1"/> </tree> </field> diff --git a/addons/website_event/data/event_demo.xml b/addons/website_event/data/event_demo.xml index 85b3a6d33ea2..b1c120dc4713 100644 --- a/addons/website_event/data/event_demo.xml +++ b/addons/website_event/data/event_demo.xml @@ -2,11 +2,11 @@ <odoo> <record id="base.res_partner_1" model="res.partner"> - <field name="website_published">True</field> + <field name="is_published">True</field> </record> <record id="event.event_0" model="event.event"> - <field name="website_published">True</field> + <field name="is_published">True</field> <field name="twitter_hashtag">odoo</field> <field name="description"><![CDATA[ <section class="s_cover parallax s_parallax_is_fixed pt96 pb96" data-scroll-background-ratio="1"> @@ -168,21 +168,21 @@ ]]></field> </record> <record id="base.res_partner_3" model="res.partner"> - <field name="website_published">True</field> + <field name="is_published">True</field> </record> <record id="base.res_partner_4" model="res.partner"> - <field name="website_published">True</field> + <field name="is_published">True</field> </record> <record id="event.event_2" model="event.event"> - <field name="website_published">True</field> + <field name="is_published">True</field> <field name="twitter_hashtag">odoo</field> </record> <record id="base.res_partner_2" model="res.partner"> - <field name="website_published">True</field> + <field name="is_published">True</field> </record> <record id="base.res_partner_address_4" model="res.partner"> - <field name="website_published">True</field> + <field name="is_published">True</field> </record> </odoo> diff --git a/addons/website_event_track/data/event_demo.xml b/addons/website_event_track/data/event_demo.xml index ce93d170a5ae..020c84759599 100644 --- a/addons/website_event_track/data/event_demo.xml +++ b/addons/website_event_track/data/event_demo.xml @@ -88,7 +88,7 @@ </record> <record id="event_track1" model="event.track"> <field name="name">How to design a new piece of furniture</field> - <field name="website_published" eval="True"/> + <field name="is_published" eval="True"/> <field name="event_id" ref="event.event_0"/> <field name="date" eval="time.strftime(str(DateTime.today().year) + '-06-04 06:00:00')"></field> <field name="location_id" ref="website_event_track.event_track_location5"/> @@ -101,7 +101,7 @@ </record> <record id="event_track2" model="event.track"> <field name="name">How to integrate hardware materials in your pieces of furniture</field> - <field name="website_published" eval="True"/> + <field name="is_published" eval="True"/> <field name="event_id" ref="event.event_0"/> <field name="date" eval="time.strftime(str(DateTime.today().year) + '-06-04 8:30:00')"></field> <field name="location_id" ref="website_event_track.event_track_location5"/> @@ -113,7 +113,7 @@ </record> <record id="event_track3" model="event.track"> <field name="name">Portfolio presentation</field> - <field name="website_published" eval="True"/> + <field name="is_published" eval="True"/> <field name="event_id" ref="event.event_0"/> <field name="date" eval="time.strftime(str(DateTime.today().year) + '-06-04 10:30:00')"></field> <field name="location_id" ref="website_event_track.event_track_location5"/> @@ -124,7 +124,7 @@ </record> <record id="event_track4" model="event.track"> <field name="name">How to develop automated processes</field> - <field name="website_published" eval="True"/> + <field name="is_published" eval="True"/> <field name="event_id" ref="event.event_0"/> <field name="date" eval="time.strftime(str(DateTime.today().year) + '-06-04 9:00:00')"></field> <field name="location_id" ref="website_event_track.event_track_location5"/> @@ -135,7 +135,7 @@ </record> <record id="event_track5" model="event.track"> <field name="name">The new way to promote your creations</field> - <field name="website_published" eval="True"/> + <field name="is_published" eval="True"/> <field name="event_id" ref="event.event_0"/> <field name="date" eval="time.strftime(str(DateTime.today().year) + '-06-04 6:00:00')"></field> <field name="location_id" ref="website_event_track.event_track_location6"/> @@ -146,7 +146,7 @@ </record> <record id="event_track6" model="event.track"> <field name="name">Detailed roadmap of our new products</field> - <field name="website_published" eval="True"/> + <field name="is_published" eval="True"/> <field name="event_id" ref="event.event_0"/> <field name="date" eval="time.strftime(str(DateTime.today().year) + '-06-04 6:30:00')"></field> <field name="location_id" ref="website_event_track.event_track_location6"/> @@ -157,7 +157,7 @@ </record> <record id="event_track7" model="event.track"> <field name="name">A technical explanation of how to use computer design apps</field> - <field name="website_published" eval="True"/> + <field name="is_published" eval="True"/> <field name="event_id" ref="event.event_0"/> <field name="date" eval="time.strftime(str(DateTime.today().year) + '-06-04 8:30:00')"></field> <field name="location_id" ref="website_event_track.event_track_location6"/> @@ -168,7 +168,7 @@ </record> <record id="event_track8" model="event.track"> <field name="name">How to optimize your sales, from leads to sales orders</field> - <field name="website_published" eval="True"/> + <field name="is_published" eval="True"/> <field name="event_id" ref="event.event_0"/> <field name="date" eval="time.strftime(str(DateTime.today().year) + '-06-04 6:00:00')"></field> <field name="location_id" ref="website_event_track.event_track_location7"/> @@ -181,7 +181,7 @@ </record> <record id="event_track9" model="event.track"> <field name="name">How to improve your quality processes</field> - <field name="website_published" eval="True"/> + <field name="is_published" eval="True"/> <field name="event_id" ref="event.event_0"/> <field name="user_id" ref="base.user_admin"/> <field name="date" eval="time.strftime(str(DateTime.today().year) + '-06-04 8:30:00')"></field> @@ -194,7 +194,7 @@ </record> <record id="event_track10" model="event.track"> <field name="name">Raising qualitive insights from your customers</field> - <field name="website_published" eval="True"/> + <field name="is_published" eval="True"/> <field name="event_id" ref="event.event_0"/> <field name="date" eval="time.strftime(str(DateTime.today().year) + '-06-04 6:30:00')"></field> <field name="location_id" ref="website_event_track.event_track_location7"/> @@ -205,7 +205,7 @@ </record> <record id="event_track11" model="event.track"> <field name="name">Discover our new design team</field> - <field name="website_published" eval="True"/> + <field name="is_published" eval="True"/> <field name="event_id" ref="event.event_0"/> <field name="date" eval="time.strftime(str(DateTime.today().year) + '-06-04 10:30:00')"></field> <field name="location_id" ref="website_event_track.event_track_location7"/> @@ -216,7 +216,7 @@ </record> <record id="event_track12" model="event.track"> <field name="name">Latest trends</field> - <field name="website_published" eval="True"/> + <field name="is_published" eval="True"/> <field name="event_id" ref="event.event_0"/> <field name="date" eval="time.strftime(str(DateTime.today().year) + '-06-04 11:00:00')"></field> <field name="location_id" ref="website_event_track.event_track_location7"/> @@ -227,7 +227,7 @@ </record> <record id="event_track13" model="event.track"> <field name="name">Advanced reporting</field> - <field name="website_published" eval="True"/> + <field name="is_published" eval="True"/> <field name="event_id" ref="event.event_0"/> <field name="date" eval="time.strftime(str(DateTime.today().year) + '-06-04 6:30:00')"></field> <field name="location_id" ref="website_event_track.event_track_location8"/> @@ -238,7 +238,7 @@ </record> <record id="event_track14" model="event.track"> <field name="name">Partnership programs</field> - <field name="website_published" eval="True"/> + <field name="is_published" eval="True"/> <field name="event_id" ref="event.event_0"/> <field name="date" eval="time.strftime(str(DateTime.today().year) + '-06-04 7:00:00')"></field> <field name="location_id" ref="website_event_track.event_track_location8"/> @@ -249,7 +249,7 @@ </record> <record id="event_track15" model="event.track"> <field name="name">How to communicate with your community</field> - <field name="website_published" eval="True"/> + <field name="is_published" eval="True"/> <field name="event_id" ref="event.event_0"/> <field name="date" eval="time.strftime(str(DateTime.today().year) + '-06-04 10:30:00')"></field> <field name="location_id" ref="website_event_track.event_track_location8"/> @@ -260,7 +260,7 @@ </record> <record id="event_track16" model="event.track"> <field name="name">How to follow us on the social media</field> - <field name="website_published" eval="True"/> + <field name="is_published" eval="True"/> <field name="event_id" ref="event.event_0"/> <field name="date" eval="time.strftime(str(DateTime.today().year) + '-06-04 11:00:00')"></field> <field name="location_id" ref="website_event_track.event_track_location8"/> @@ -271,7 +271,7 @@ </record> <record id="event_track17" model="event.track"> <field name="name">The new marketing strategy</field> - <field name="website_published" eval="True"/> + <field name="is_published" eval="True"/> <field name="event_id" ref="event.event_0"/> <field name="date" eval="time.strftime(str(DateTime.today().year) + '-06-04 6:00:00')"></field> <field name="location_id" ref="website_event_track.event_track_location9"/> @@ -282,7 +282,7 @@ </record> <record id="event_track18" model="event.track"> <field name="name">How to build your marketing strategy within a competitive environment</field> - <field name="website_published" eval="True"/> + <field name="is_published" eval="True"/> <field name="event_id" ref="event.event_0"/> <field name="date" eval="time.strftime(str(DateTime.today().year) + '-06-04 8:30:00')"></field> <field name="location_id" ref="website_event_track.event_track_location9"/> @@ -294,7 +294,7 @@ </record> <record id="event_track19" model="event.track"> <field name="name">Advanced lead management : tips and tricks from the fields</field> - <field name="website_published" eval="True"/> + <field name="is_published" eval="True"/> <field name="event_id" ref="event.event_0"/> <field name="date" eval="time.strftime(str(DateTime.today().year) + '-06-04 9:00:00')"></field> <field name="location_id" ref="website_event_track.event_track_location9"/> @@ -306,7 +306,7 @@ </record> <record id="event_track20" model="event.track"> <field name="name">New Certification Program</field> - <field name="website_published" eval="True"/> + <field name="is_published" eval="True"/> <field name="event_id" ref="event.event_0"/> <field name="date" eval="time.strftime(str(DateTime.today().year) + '-06-04 10:00:00')"></field> <field name="location_id" ref="website_event_track.event_track_location9"/> @@ -317,7 +317,7 @@ </record> <record id="event_track21" model="event.track"> <field name="name">House of World Cultures</field> - <field name="website_published" eval="True"/> + <field name="is_published" eval="True"/> <field name="event_id" ref="event.event_0"/> <field name="date" eval="time.strftime(str(DateTime.today().year) + '-06-04 10:30:00')"></field> <field name="location_id" ref="website_event_track.event_track_location9"/> @@ -328,7 +328,7 @@ </record> <record id="event_track22" model="event.track"> <field name="name">Minimal but efficient design</field> - <field name="website_published" eval="True"/> + <field name="is_published" eval="True"/> <field name="event_id" ref="event.event_0"/> <field name="date" eval="time.strftime(str(DateTime.today().year) + '-06-04 11:00:00')"></field> <field name="location_id" ref="website_event_track.event_track_location9"/> @@ -339,7 +339,7 @@ </record> <record id="event_track23" model="event.track"> <field name="name">Key Success factors selling our furniture</field> - <field name="website_published" eval="True"/> + <field name="is_published" eval="True"/> <field name="event_id" ref="event.event_0"/> <field name="date" eval="time.strftime(str(DateTime.today().year) + '-06-04 7:00:00')"></field> <field name="location_id" ref="website_event_track.event_track_location9"/> @@ -350,7 +350,7 @@ </record> <record id="event_track24" model="event.track"> <field name="name">Design contest (entire day)</field> - <field name="website_published" eval="True"/> + <field name="is_published" eval="True"/> <field name="event_id" ref="event.event_0"/> <field name="date" eval="time.strftime(str(DateTime.today().year) + '-06-04 6:00:00')"></field> <field name="location_id" ref="website_event_track.event_track_location10"/> @@ -361,7 +361,7 @@ </record> <record id="event_track25" model="event.track"> <field name="name">Design contest (entire afternoon)</field> - <field name="website_published" eval="True"/> + <field name="is_published" eval="True"/> <field name="event_id" ref="event.event_0"/> <field name="date" eval="time.strftime(str(DateTime.today().year) + '-06-04 8:30:00')"></field> <field name="location_id" ref="website_event_track.event_track_location10"/> @@ -372,7 +372,7 @@ </record> <record id="event_track27" model="event.track"> <field name="name">My Company global presentation</field> - <field name="website_published" eval="True"/> + <field name="is_published" eval="True"/> <field name="event_id" ref="event.event_0"/> <field name="date" eval="time.strftime(str(DateTime.today().year) + '-06-04 04:00:00')"></field> <field name="duration" eval="1"/> @@ -383,7 +383,7 @@ </record> <record id="event_track28" model="event.track"> <field name="name">Status & Strategy</field> - <field name="website_published" eval="True"/> + <field name="is_published" eval="True"/> <field name="event_id" ref="event.event_0"/> <field name="date" eval="time.strftime(str(DateTime.today().year) + '-06-04 5:00:00')"></field> <field name="duration" eval="0.5"/> @@ -393,7 +393,7 @@ </record> <record id="event_track29" model="event.track"> <field name="name">The new marketing strategy</field> - <field name="website_published" eval="True"/> + <field name="is_published" eval="True"/> <field name="event_id" ref="event.event_0"/> <field name="date" eval="time.strftime(str(DateTime.today().year) + '-06-04 5:30:00')"></field> <field name="duration" eval="0.25"/> @@ -404,7 +404,7 @@ </record> <record id="event_track30" model="event.track"> <field name="name">Morning break</field> - <field name="website_published" eval="True"/> + <field name="is_published" eval="True"/> <field name="event_id" ref="event.event_0"/> <field name="date" eval="time.strftime(str(DateTime.today().year) + '-06-04 5:45:00')"></field> <field name="duration" eval="0.25"/> @@ -413,7 +413,7 @@ </record> <record id="event_track31" model="event.track"> <field name="name">Lunch</field> - <field name="website_published" eval="True"/> + <field name="is_published" eval="True"/> <field name="event_id" ref="event.event_0"/> <field name="date" eval="time.strftime(str(DateTime.today().year) + '-06-04 7:30:00')"></field> <field name="duration" eval="1"/> diff --git a/addons/website_form/views/website_form_templates.xml b/addons/website_form/views/website_form_templates.xml index 95f730e85655..27038682ab6f 100644 --- a/addons/website_form/views/website_form_templates.xml +++ b/addons/website_form/views/website_form_templates.xml @@ -74,7 +74,7 @@ <field name="name">Thanks (Contact us)</field> <field name="type">qweb</field> <field name="url">/contactus-thank-you</field> - <field name="website_published">True</field> + <field name="is_published">True</field> <field name="key">website_form.contactus_thanks</field> <field name="arch" type="xml"> <t name="Thanks (Contact us)" t-name="website_form.contactus_thanks"> diff --git a/addons/website_hr_recruitment/data/hr_job_demo.xml b/addons/website_hr_recruitment/data/hr_job_demo.xml index 1afc5496c4d1..5569eaa6f008 100644 --- a/addons/website_hr_recruitment/data/hr_job_demo.xml +++ b/addons/website_hr_recruitment/data/hr_job_demo.xml @@ -2,7 +2,7 @@ <odoo> <record id="hr.job_marketing" model="hr.job"> - <field name="website_published">True</field> + <field name="is_published">True</field> <field name="website_description" type="html"> <section class="mt16 mb16 oe_dark"> <div class="container"> @@ -134,7 +134,7 @@ </record> <record id="hr.job_developer" model="hr.job"> - <field name="website_published">True</field> + <field name="is_published">True</field> <field name="website_description" type="html"> <section class="mt16 mb16 oe_dark"> <div class="container"> @@ -267,7 +267,7 @@ </record> <record id="hr.job_consultant" model="hr.job"> - <field name="website_published">True</field> + <field name="is_published">True</field> <field name="website_description" type="html"> <section class="mt16 mb16 oe_dark"> <div class="container"> diff --git a/addons/website_hr_recruitment/views/website_hr_recruitment_templates.xml b/addons/website_hr_recruitment/views/website_hr_recruitment_templates.xml index c25a60b78f8d..c6b97824cfbe 100644 --- a/addons/website_hr_recruitment/views/website_hr_recruitment_templates.xml +++ b/addons/website_hr_recruitment/views/website_hr_recruitment_templates.xml @@ -398,7 +398,7 @@ <record id="thankyou" model="website.page"> <field name="url">/job-thank-you</field> - <field name="website_published">True</field> + <field name="is_published">True</field> <field name="name">Thank you (Recruitment)</field> <field name="type">qweb</field> <field name="key">website_hr_recruitment.thankyou</field> diff --git a/addons/website_membership/data/membership_demo.xml b/addons/website_membership/data/membership_demo.xml index 395dff2f03b9..2aefbc272151 100644 --- a/addons/website_membership/data/membership_demo.xml +++ b/addons/website_membership/data/membership_demo.xml @@ -3,10 +3,10 @@ <data noupdate="1"> <record id="base.res_partner_12" model="res.partner"> - <field name="website_published" eval="True"/> + <field name="is_published" eval="True"/> </record> <record id="base.res_partner_2" model="res.partner"> - <field name="website_published" eval="True"/> + <field name="is_published" eval="True"/> </record> </data> diff --git a/addons/website_partner/data/website_partner_data.xml b/addons/website_partner/data/website_partner_data.xml index c60a21e72a0b..4adb17161e80 100644 --- a/addons/website_partner/data/website_partner_data.xml +++ b/addons/website_partner/data/website_partner_data.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <odoo> <record id="base.main_partner" model="res.partner"> - <field name="website_published">True</field> + <field name="is_published">True</field> </record> -</odoo> \ No newline at end of file +</odoo> diff --git a/addons/website_partner/data/website_partner_demo.xml b/addons/website_partner/data/website_partner_demo.xml index a139e80be94d..f29bc76dc507 100644 --- a/addons/website_partner/data/website_partner_demo.xml +++ b/addons/website_partner/data/website_partner_demo.xml @@ -2,53 +2,53 @@ <odoo> <record id="base.partner_admin" model="res.partner"> - <field name="website_published">True</field> + <field name="is_published">True</field> </record> <record id="base.partner_demo" model="res.partner"> - <field name="website_published">True</field> + <field name="is_published">True</field> </record> <record id="base.partner_demo_portal" model="res.partner"> - <field name="website_published">True</field> + <field name="is_published">True</field> </record> <record id="base.res_partner_12" model="res.partner"> - <field name="website_published">True</field> + <field name="is_published">True</field> </record> <record id="base.res_partner_12" model="res.partner"> - <field name="website_published">True</field> + <field name="is_published">True</field> </record> <record id="base.res_partner_2" model="res.partner"> - <field name="website_published">True</field> + <field name="is_published">True</field> </record> <record id="base.res_partner_1" model="res.partner"> - <field name="website_published">True</field> + <field name="is_published">True</field> </record> <record id="base.res_partner_12" model="res.partner"> - <field name="website_published">True</field> + <field name="is_published">True</field> </record> <record id="base.res_partner_3" model="res.partner"> - <field name="website_published">True</field> + <field name="is_published">True</field> </record> <record id="base.res_partner_3" model="res.partner"> - <field name="website_published">True</field> + <field name="is_published">True</field> </record> <record id="base.res_partner_2" model="res.partner"> - <field name="website_published">True</field> + <field name="is_published">True</field> </record> <record id="base.res_partner_18" model="res.partner"> - <field name="website_published">True</field> + <field name="is_published">True</field> </record> <record id="base.res_partner_10" model="res.partner"> - <field name="website_published">True</field> + <field name="is_published">True</field> </record> <record id="base.res_partner_12" model="res.partner"> diff --git a/addons/website_rating/models/rating.py b/addons/website_rating/models/rating.py index 33184ca90514..1b5e99e3e62b 100644 --- a/addons/website_rating/models/rating.py +++ b/addons/website_rating/models/rating.py @@ -7,6 +7,4 @@ class Rating(models.Model): _inherit = 'rating.rating' # Add this related field to mail.message for performance reason - # This field may one day be deplaced to another module (like 'website_rating') if it is required for - # another usage not related to website_sale. website_published = fields.Boolean(related='message_id.website_published', store=True, readonly=False) diff --git a/addons/website_sale/data/demo.xml b/addons/website_sale/data/demo.xml index d8eeb7ec088c..d4752f1778e1 100644 --- a/addons/website_sale/data/demo.xml +++ b/addons/website_sale/data/demo.xml @@ -6,56 +6,56 @@ </record> <record id="product.product_product_24" model="product.product"> - <field name="website_published" eval="True"/> + <field name="is_published" eval="True"/> </record> <record id="product.product_product_5" model="product.product"> - <field name="website_published" eval="True"/> + <field name="is_published" eval="True"/> </record> <record id="product.product_product_12" model="product.product"> - <field name="website_published" eval="True"/> + <field name="is_published" eval="True"/> </record> <record id="product.product_product_10" model="product.product"> - <field name="website_published" eval="True"/> + <field name="is_published" eval="True"/> </record> <record id="product.product_product_13" model="product.product"> - <field name="website_published" eval="True"/> + <field name="is_published" eval="True"/> </record> <record id="product.product_product_25" model="product.product"> - <field name="website_published" eval="True"/> + <field name="is_published" eval="True"/> </record> <record id="product.consu_delivery_02" model="product.product"> - <field name="website_published" eval="True"/> + <field name="is_published" eval="True"/> </record> <record id="product.product_delivery_01" model="product.product"> - <field name="website_published" eval="True"/> + <field name="is_published" eval="True"/> </record> <record id="product.product_product_3" model="product.product"> - <field name="website_published" eval="True"/> + <field name="is_published" eval="True"/> </record> <record id="product.product_product_22" model="product.product"> - <field name="website_published" eval="True"/> + <field name="is_published" eval="True"/> </record> <record id="product.consu_delivery_03" model="product.product"> - <field name="website_published" eval="True"/> + <field name="is_published" eval="True"/> </record> <record id="product.product_product_27" model="product.product"> - <field name="website_published" eval="True"/> + <field name="is_published" eval="True"/> </record> <record id="product.product_delivery_02" model="product.product"> - <field name="website_published" eval="True"/> + <field name="is_published" eval="True"/> </record> <record id="product.product_product_16" model="product.product"> - <field name="website_published" eval="True"/> + <field name="is_published" eval="True"/> </record> <record id="product.consu_delivery_01" model="product.product"> - <field name="website_published" eval="True"/> + <field name="is_published" eval="True"/> </record> <record id="product.product_order_01" model="product.product"> - <field name="website_published" eval="True"/> + <field name="is_published" eval="True"/> </record> <record id="product.product_product_4" model="product.product"> - <field name="website_published" eval="True"/> + <field name="is_published" eval="True"/> <field name="website_size_x">2</field> <field name="website_size_y">2</field> <field name="website_sequence">9950</field> @@ -63,25 +63,25 @@ </record> <record id="product.product_product_6" model="product.product"> - <field name="website_published" eval="True"/> + <field name="is_published" eval="True"/> <field name="website_sequence">10010</field> <field name="website_style_ids" eval="[(6,0,[ref('website_sale.image_full')])]"/> </record> <record id="product.product_product_7" model="product.product"> - <field name="website_published" eval="True"/> + <field name="is_published" eval="True"/> </record> <record id="product.product_product_8" model="product.product"> - <field name="website_published" eval="True"/> + <field name="is_published" eval="True"/> </record> <record id="product.product_product_9" model="product.product"> - <field name="website_published" eval="True"/> + <field name="is_published" eval="True"/> </record> <record id="product.product_product_11" model="product.product"> - <field name="website_published" eval="True"/> + <field name="is_published" eval="True"/> <field name="accessory_product_ids" eval="[(6, 0, [ref('product.product_product_7')])]"/> </record> @@ -636,7 +636,7 @@ <field name="name">Warranty</field> <field name="list_price">20.0</field> <field name="website_sequence">9980</field> - <field name="website_published" eval="True"/> + <field name="is_published" eval="True"/> <field name="type">service</field> <field name="uom_id" ref="uom.product_uom_unit"/> <field name="uom_po_id" ref="uom.product_uom_unit"/> diff --git a/addons/website_sale/tests/test_customize.py b/addons/website_sale/tests/test_customize.py index deab4212c5c0..d120d7f66518 100644 --- a/addons/website_sale/tests/test_customize.py +++ b/addons/website_sale/tests/test_customize.py @@ -11,7 +11,7 @@ class TestUi(odoo.tests.HttpCase): # create a template product_template = self.env['product.template'].create({ 'name': 'Test Product', - 'website_published': True, + 'is_published': True, 'list_price': 750, }) @@ -147,7 +147,7 @@ class TestUi(odoo.tests.HttpCase): # create the template product_template = self.env['product.template'].create({ 'name': 'Test Product 2', - 'website_published': True, + 'is_published': True, }) # set attribute and attribute values on the template diff --git a/addons/website_sale/views/product_views.xml b/addons/website_sale/views/product_views.xml index 43284ead3683..6b68b0e6ba4f 100644 --- a/addons/website_sale/views/product_views.xml +++ b/addons/website_sale/views/product_views.xml @@ -7,7 +7,7 @@ <field name="arch" type="xml"> <xpath expr="//filter[@name='consumable']" position="after"> <separator/> - <filter string="Published" name="published" domain="[('website_published', '=', True)]"/> + <filter string="Published" name="published" domain="[('is_published', '=', True)]"/> </xpath> </field> </record> diff --git a/addons/website_sale_delivery/data/website_sale_delivery_data.xml b/addons/website_sale_delivery/data/website_sale_delivery_data.xml index d77522880d03..67bedede3675 100644 --- a/addons/website_sale_delivery/data/website_sale_delivery_data.xml +++ b/addons/website_sale_delivery/data/website_sale_delivery_data.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <odoo> <record id="delivery.free_delivery_carrier" model="delivery.carrier"> - <field name="website_published" eval="True"/> + <field name="is_published" eval="True"/> </record> </odoo> diff --git a/addons/website_sale_delivery/data/website_sale_delivery_demo.xml b/addons/website_sale_delivery/data/website_sale_delivery_demo.xml index 39b3fa7892f0..07c440824b39 100644 --- a/addons/website_sale_delivery/data/website_sale_delivery_demo.xml +++ b/addons/website_sale_delivery/data/website_sale_delivery_demo.xml @@ -3,11 +3,11 @@ <data noupdate="1"> <record id="delivery.delivery_carrier" model="delivery.carrier"> - <field name="website_published" eval="False" /> + <field name="is_published" eval="False" /> </record> <record id="delivery.normal_delivery_carrier" model="delivery.carrier"> - <field name="website_published" eval="False" /> + <field name="is_published" eval="False" /> </record> </data> diff --git a/addons/website_sale_delivery/views/website_sale_delivery_views.xml b/addons/website_sale_delivery/views/website_sale_delivery_views.xml index 7638048dba1e..3ad54b1d01ab 100644 --- a/addons/website_sale_delivery/views/website_sale_delivery_views.xml +++ b/addons/website_sale_delivery/views/website_sale_delivery_views.xml @@ -28,7 +28,7 @@ <field name="inherit_id" ref="delivery.view_delivery_carrier_tree"/> <field name="arch" type="xml"> <field name="delivery_type" position="after"> - <field name="website_published"/> + <field name="is_published"/> <field name="website_id" groups="website.group_multi_website"/> </field> </field> @@ -40,7 +40,7 @@ <field name="inherit_id" ref="delivery.view_delivery_carrier_search"/> <field name="arch" type="xml"> <filter name="inactive" position="after"> - <filter string="Published" name="website_published" domain="[('website_published','=',True)]"/> + <filter string="Published" name="is_published" domain="[('is_published','=',True)]"/> </filter> </field> </record> diff --git a/addons/website_sale_digital/data/product_demo.xml b/addons/website_sale_digital/data/product_demo.xml index 444ea7f5dc07..d8723d4a6c6c 100644 --- a/addons/website_sale_digital/data/product_demo.xml +++ b/addons/website_sale_digital/data/product_demo.xml @@ -6,7 +6,7 @@ <field name="standard_price">2</field> <field name="list_price">4.50</field> <field name="type">service</field> - <field name="website_published" eval="True"/> + <field name="is_published" eval="True"/> <field name="image_1920" type="base64" file="website_sale_digital/static/digital_product_1.jpg"/> <field name="categ_id" ref="product.product_category_6"/> </record> diff --git a/addons/website_sale_product_configurator/data/demo.xml b/addons/website_sale_product_configurator/data/demo.xml index db513297a7b6..6697d426cb96 100644 --- a/addons/website_sale_product_configurator/data/demo.xml +++ b/addons/website_sale_product_configurator/data/demo.xml @@ -2,7 +2,7 @@ <odoo noupdate="1"> <record id="sale_product_configurator.product_product_1_product_template" model="product.template"> <field name="website_sequence">9980</field> - <field name="website_published" eval="True"/> + <field name="is_published" eval="True"/> </record> <record id="product.product_product_4_product_template" model="product.template"> <field name="optional_product_ids" eval="[(6,0,[ref('product.product_product_11_product_template'), ref('website_sale.product_product_1_product_template')])]"/> diff --git a/addons/website_sale_slides/data/website_sale_slides_demo.xml b/addons/website_sale_slides/data/website_sale_slides_demo.xml index f578264c9072..57f4857dc6e9 100644 --- a/addons/website_sale_slides/data/website_sale_slides_demo.xml +++ b/addons/website_sale_slides/data/website_sale_slides_demo.xml @@ -8,7 +8,7 @@ <field name="standard_price">100.0</field> <field name="list_price">100.0</field> <field name="type">service</field> - <field name="website_published" eval="True"/> + <field name="is_published" eval="True"/> <field name="image_1920" type="base64" file="website_sale_slides/static/img/product_course.png"/> </record> @@ -24,7 +24,7 @@ <field name="standard_price">12.0</field> <field name="list_price">12.0</field> <field name="type">consu</field> - <field name="website_published" eval="True"/> + <field name="is_published" eval="True"/> <field name="image_1920" type="base64" file="website_sale_slides/static/img/water_can.jpg"/> </record> @@ -33,7 +33,7 @@ <field name="standard_price">4.5</field> <field name="list_price">4.5</field> <field name="type">consu</field> - <field name="website_published" eval="True"/> + <field name="is_published" eval="True"/> <field name="image_1920" type="base64" file="website_sale_slides/static/img/flower_pot.jpg"/> </record> @@ -42,7 +42,7 @@ <field name="standard_price">150.0</field> <field name="list_price">150.0</field> <field name="type">service</field> - <field name="website_published" eval="True"/> + <field name="is_published" eval="True"/> <field name="image_1920" type="base64" file="website_sale_slides/static/img/channel_demo_tree_1.jpg"/> </record> diff --git a/addons/website_sale_stock/data/website_sale_stock_demo.xml b/addons/website_sale_stock/data/website_sale_stock_demo.xml index 90789d7d481f..5bcd5ed96403 100644 --- a/addons/website_sale_stock/data/website_sale_stock_demo.xml +++ b/addons/website_sale_stock/data/website_sale_stock_demo.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8"?> <odoo> <record id="stock.product_cable_management_box" model="product.product"> - <field name="website_published" eval="True"/> + <field name="is_published" eval="True"/> </record> <record id="stock.product_cable_management_box_product_template" model="product.template"> <field name="public_categ_ids" eval="[(6,0,[ref('website_sale.public_category_boxes')])]"/> diff --git a/addons/website_slides/controllers/main.py b/addons/website_slides/controllers/main.py index 57c25a04af0b..634da1604590 100644 --- a/addons/website_slides/controllers/main.py +++ b/addons/website_slides/controllers/main.py @@ -820,7 +820,7 @@ class WebsiteSlides(WebsiteProfile): try: values['user_id'] = request.env.uid - values['website_published'] = values.get('website_published', False) and can_publish + values['is_published'] = values.get('is_published', False) and can_publish slide = request.env['slide.slide'].sudo().create(values) except (UserError, AccessError) as e: _logger.error(e) @@ -836,17 +836,17 @@ class WebsiteSlides(WebsiteProfile): redirect_url += "?enable_editor=1" if slide.slide_type == "quiz": action_id = request.env.ref('website_slides.action_slides_slides').id - redirect_url = '/web#id=%s&action=%s&model=slide.slide&view_type=form' %(slide.id,action_id) + redirect_url = '/web#id=%s&action=%s&model=slide.slide&view_type=form' % (slide.id, action_id) return { 'url': redirect_url, 'channel_type': channel.channel_type, 'slide_id': slide.id, 'category_id': slide.category_id - } + } def _get_valid_slide_post_values(self): return ['name', 'url', 'tag_ids', 'slide_type', 'channel_id', 'is_preview', - 'mime_type', 'datas', 'description', 'image_1920', 'index_content', 'website_published'] + 'mime_type', 'datas', 'description', 'image_1920', 'index_content', 'is_published'] @http.route(['/slides/tag/search_read'], type='json', auth='user', methods=['POST'], website=True) def slide_tag_search_read(self, fields, domain): diff --git a/addons/website_slides/data/gamification_data.xml b/addons/website_slides/data/gamification_data.xml index 08606251fad8..4cb9ce47af79 100644 --- a/addons/website_slides/data/gamification_data.xml +++ b/addons/website_slides/data/gamification_data.xml @@ -6,7 +6,7 @@ <field name="name">Get started</field> <field name="description">Register to the platform</field> <field name="image_1920" type="base64" file="website_slides/static/src/img/standard_badge_bronze.svg"/> - <field name="website_published" eval="True"/> + <field name="is_published" eval="True"/> <field name="level">bronze</field> <field name="rule_auth">nobody</field> </record> @@ -47,7 +47,7 @@ <field name="name">Know yourself</field> <field name="description">Complete your profile</field> <field name="image_1920" type="base64" file="website_slides/static/src/img/standard_badge_bronze.svg"/> - <field name="website_published" eval="True"/> + <field name="is_published" eval="True"/> <field name="level">bronze</field> <field name="rule_auth">nobody</field> </record> @@ -89,7 +89,7 @@ <field name="name">Power User</field> <field name="description">Complete a course</field> <field name="image_1920" type="base64" file="website_slides/static/src/img/standard_badge_silver.svg"/> - <field name="website_published" eval="True"/> + <field name="is_published" eval="True"/> <field name="level">silver</field> <field name="rule_auth">nobody</field> </record> @@ -129,7 +129,7 @@ <field name="name">Certified Knowledge</field> <field name="description">Get a certification</field> <field name="image_1920" type="base64" file="website_slides/static/src/img/standard_badge_gold.svg"/> - <field name="website_published" eval="False"/> + <field name="is_published" eval="False"/> <field name="level">gold</field> <field name="rule_auth">nobody</field> </record> @@ -170,7 +170,7 @@ <field name="name">Community hero</field> <field name="description">Reach 2000 XP</field> <field name="image_1920" type="base64" file="website_slides/static/src/img/standard_badge_gold.svg"/> - <field name="website_published" eval="True"/> + <field name="is_published" eval="True"/> <field name="level">gold</field> <field name="rule_auth">nobody</field> </record> diff --git a/addons/website_slides/data/slide_channel_demo.xml b/addons/website_slides/data/slide_channel_demo.xml index d88c30abe46a..9e19e99d2187 100644 --- a/addons/website_slides/data/slide_channel_demo.xml +++ b/addons/website_slides/data/slide_channel_demo.xml @@ -22,7 +22,7 @@ <field name="channel_type">training</field> <field name="allow_comment" eval="True"/> <field name="promote_strategy">latest</field> - <field name="website_published" eval="True"/> + <field name="is_published" eval="True"/> <field name="tag_ids" eval="[(5, 0), (4, ref('website_slides.slide_channel_tag_level_intermediate')), (4, ref('website_slides.slide_channel_tag_role_gardener')), @@ -48,7 +48,7 @@ <field name="channel_type">documentation</field> <field name="allow_comment" eval="True"/> <field name="promote_strategy">most_viewed</field> - <field name="website_published" eval="True"/> + <field name="is_published" eval="True"/> <field name="tag_ids" eval="[(5, 0), (4, ref('website_slides.slide_channel_tag_level_intermediate')), (4, ref('website_slides.slide_channel_tag_role_gardener')), @@ -76,7 +76,7 @@ <field name="channel_type">training</field> <field name="allow_comment" eval="True"/> <field name="promote_strategy">latest</field> - <field name="website_published" eval="True"/> + <field name="is_published" eval="True"/> <field name="tag_ids" eval="[(5, 0), (4, ref('website_slides.slide_channel_tag_level_intermediate')), (4, ref('website_slides.slide_channel_tag_role_gardener')), @@ -100,7 +100,7 @@ will learn the basics of wood characteristics.</field> <field name="channel_type">documentation</field> <field name="allow_comment" eval="True"/> <field name="promote_strategy">most_voted</field> - <field name="website_published" eval="True"/> + <field name="is_published" eval="True"/> <field name="tag_ids" eval="[(5, 0), (4, ref('website_slides.slide_channel_tag_level_basic')), (4, ref('website_slides.slide_channel_tag_role_furniture'))]"/> @@ -120,7 +120,7 @@ will learn the basics of wood characteristics.</field> <field name="channel_type">training</field> <field name="allow_comment" eval="True"/> <field name="promote_strategy">latest</field> - <field name="website_published" eval="True"/> + <field name="is_published" eval="True"/> <field name="tag_ids" eval="[(5, 0), (4, ref('website_slides.slide_channel_tag_level_intermediate')), (4, ref('website_slides.slide_channel_tag_role_furniture')), @@ -153,7 +153,7 @@ will learn the basics of wood characteristics.</field> <field name="channel_type">training</field> <field name="allow_comment" eval="True"/> <field name="promote_strategy">most_voted</field> - <field name="website_published" eval="True"/> + <field name="is_published" eval="True"/> <field name="tag_ids" eval="[(5, 0), (4, ref('website_slides.slide_channel_tag_level_advanced')), (4, ref('website_slides.slide_channel_tag_role_carpenter')), diff --git a/addons/website_slides/data/slide_channel_tag_demo.xml b/addons/website_slides/data/slide_channel_tag_demo.xml index 7b9a843fc29d..aa4d31c33e77 100644 --- a/addons/website_slides/data/slide_channel_tag_demo.xml +++ b/addons/website_slides/data/slide_channel_tag_demo.xml @@ -2,7 +2,7 @@ <odoo><data noupdate="1"> <record id="slide_channel_tag_group_level" model="slide.channel.tag.group"> <field name="name">Your Level</field> - <field name="website_published" eval="True"/> + <field name="is_published" eval="True"/> </record> <record id="slide_channel_tag_level_basic" model="slide.channel.tag"> <field name="name">Basic</field> @@ -19,7 +19,7 @@ <record id="slide_channel_tag_group_role" model="slide.channel.tag.group"> <field name="name">Your Role</field> - <field name="website_published" eval="True"/> + <field name="is_published" eval="True"/> </record> <record id="slide_channel_tag_role_gardener" model="slide.channel.tag"> <field name="name">Gardener</field> diff --git a/addons/website_slides/data/slide_data.xml b/addons/website_slides/data/slide_data.xml index 1490dfd5c058..e437c07e8f21 100644 --- a/addons/website_slides/data/slide_data.xml +++ b/addons/website_slides/data/slide_data.xml @@ -4,7 +4,7 @@ <record model="slide.channel" id="channel_public"> <field name="name">Our documentation</field> <field name="promote_strategy">most_viewed</field> - <field name="website_published" eval="True"/> + <field name="is_published" eval="True"/> <field name="enroll">public</field> <field name="description">Public access to presentations and documentation.</field> </record> @@ -12,7 +12,7 @@ <record id="slide_channel_tag_group_data_other" model="slide.channel.tag.group"> <field name="name">Tags</field> <field name="sequence">20</field> - <field name="website_published" eval="True"/> + <field name="is_published" eval="True"/> </record> </data> </odoo> diff --git a/addons/website_slides/data/slide_slide_demo.xml b/addons/website_slides/data/slide_slide_demo.xml index 3e329b38c289..d24b7edce735 100644 --- a/addons/website_slides/data/slide_slide_demo.xml +++ b/addons/website_slides/data/slide_slide_demo.xml @@ -11,7 +11,7 @@ <field name="slide_type">presentation</field> <field name="channel_id" ref="website_slides.channel_public"/> <field name="category_id" eval="False"/> - <field name="website_published" eval="True"/> + <field name="is_published" eval="True"/> <field name="is_preview" eval="True"/> <field name="public_views">10</field> <field name="completion_time">2.5</field> @@ -25,7 +25,7 @@ <field name="slide_type">infographic</field> <field name="channel_id" ref="website_slides.channel_public"/> <field name="category_id" eval="False"/> - <field name="website_published" eval="True"/> + <field name="is_published" eval="True"/> <field name="is_preview" eval="False"/> <field name="public_views">5</field> <field name="completion_time">1</field> @@ -42,7 +42,7 @@ <field name="slide_type">infographic</field> <field name="channel_id" ref="website_slides.slide_channel_demo_1_gard1"/> <field name="category_id" ref="website_slides.slide_category_demo_1_0"/> - <field name="website_published" eval="True"/> + <field name="is_published" eval="True"/> <field name="is_preview" eval="True"/> <field name="public_views">5</field> <field name="completion_time">0.5</field> @@ -56,7 +56,7 @@ <field name="slide_type">infographic</field> <field name="channel_id" ref="website_slides.slide_channel_demo_1_gard1"/> <field name="category_id" ref="website_slides.slide_category_demo_1_0"/> - <field name="website_published" eval="True"/> + <field name="is_published" eval="True"/> <field name="is_preview" eval="False"/> <field name="public_views">5</field> <field name="completion_time">1.5</field> @@ -70,7 +70,7 @@ <field name="slide_type">infographic</field> <field name="channel_id" ref="website_slides.slide_channel_demo_1_gard1"/> <field name="category_id" ref="website_slides.slide_category_demo_1_0"/> - <field name="website_published" eval="True"/> + <field name="is_published" eval="True"/> <field name="is_preview" eval="False"/> <field name="public_views">10</field> <field name="completion_time">1</field> @@ -96,7 +96,7 @@ <field name="slide_type">video</field> <field name="channel_id" ref="website_slides.slide_channel_demo_1_gard1"/> <field name="category_id" ref="website_slides.slide_category_demo_1_1"/> - <field name="website_published" eval="True"/> + <field name="is_published" eval="True"/> <field name="is_preview" eval="False"/> <field name="public_views">0</field> <field name="completion_time">1</field> @@ -145,7 +145,7 @@ </div> </div> </section></field> - <field name="website_published" eval="True"/> + <field name="is_published" eval="True"/> <field name="is_preview" eval="True"/> <field name="public_views">5</field> <field name="completion_time">1</field> @@ -203,7 +203,7 @@ <field name="slide_type">presentation</field> <field name="channel_id" ref="website_slides.slide_channel_demo_1_gard1"/> <field name="category_id" ref="website_slides.slide_category_demo_1_1"/> - <field name="website_published" eval="True"/> + <field name="is_published" eval="True"/> <field name="is_preview" eval="False"/> <field name="public_views">10</field> <field name="completion_time">2.5</field> @@ -221,7 +221,7 @@ <field name="slide_type">presentation</field> <field name="channel_id" ref="website_slides.slide_channel_demo_2_gard2"/> <field name="category_id" ref="website_slides.slide_category_demo_2_0"/> - <field name="website_published" eval="True"/> + <field name="is_published" eval="True"/> <field name="is_preview" eval="True"/> <field name="public_views">0</field> <field name="completion_time">1</field> @@ -317,7 +317,7 @@ </div> </div> </section></field> - <field name="website_published" eval="True"/> + <field name="is_published" eval="True"/> <field name="is_preview" eval="False"/> <field name="public_views">0</field> <field name="completion_time">2</field> @@ -332,7 +332,7 @@ <field name="slide_type">video</field> <field name="channel_id" ref="website_slides.slide_channel_demo_2_gard2"/> <field name="category_id" ref="website_slides.slide_category_demo_2_0"/> - <field name="website_published" eval="True"/> + <field name="is_published" eval="True"/> <field name="is_preview" eval="False"/> <field name="public_views">0</field> <field name="completion_time">1</field> @@ -350,7 +350,7 @@ <field name="slide_type">presentation</field> <field name="channel_id" ref="website_slides.slide_channel_demo_5_furn2"/> <field name="category_id" ref="website_slides.slide_category_demo_5_0"/> - <field name="website_published" eval="True"/> + <field name="is_published" eval="True"/> <field name="is_preview" eval="True"/> <field name="public_views">10</field> <field name="completion_time">2.5</field> @@ -377,7 +377,7 @@ <field name="channel_id" ref="website_slides.slide_channel_demo_5_furn2"/> <field name="category_id" ref="website_slides.slide_category_demo_5_1"/> <field name="category_id" eval="False"/> - <field name="website_published" eval="True"/> + <field name="is_published" eval="True"/> <field name="is_preview" eval="False"/> <field name="public_views">0</field> <field name="completion_time">1</field> @@ -393,7 +393,7 @@ <field name="channel_id" ref="website_slides.slide_channel_demo_5_furn2"/> <field name="category_id" ref="website_slides.slide_category_demo_5_1"/> <field name="category_id" eval="False"/> - <field name="website_published" eval="True"/> + <field name="is_published" eval="True"/> <field name="is_preview" eval="True"/> <field name="public_views">5</field> <field name="completion_time">3</field> @@ -403,10 +403,10 @@ <field name="name">Test your knowledge !</field> <field name="sequence">4</field> <field name="image_1920" type="base64" file="website_slides/static/src/img/slide_demo_owl.jpg"/> - <field name="slide_type">quiz</field> + <field name="slide_type">quiz</field> <field name="channel_id" ref="website_slides.slide_channel_demo_5_furn2"/> <field name="category_id" ref="website_slides.slide_category_demo_5_0"/> - <field name="website_published" eval="True"/> + <field name="is_published" eval="True"/> <field name="is_preview" eval="False"/> <field name="public_views">0</field> <field name="completion_time">0.5</field> diff --git a/addons/website_slides/models/slide_channel.py b/addons/website_slides/models/slide_channel.py index 0b780567c0cf..caf356b90ffc 100644 --- a/addons/website_slides/models/slide_channel.py +++ b/addons/website_slides/models/slide_channel.py @@ -200,7 +200,7 @@ class Channel(models.Model): def _compute_slides_statistics(self): result = dict((cid, dict(total_views=0, total_votes=0, total_time=0)) for cid in self.ids) read_group_res = self.env['slide.slide'].read_group( - [('is_published', '=', True),('channel_id', 'in', self.ids)], + [('website_published', '=', True), ('channel_id', 'in', self.ids)], ['channel_id', 'slide_type', 'likes', 'dislikes', 'total_views', 'completion_time'], groupby=['channel_id', 'slide_type'], lazy=False) @@ -534,7 +534,7 @@ class Category(models.Model): def _count_presentations(self): result = dict.fromkeys(self.ids, dict()) res = self.env['slide.slide'].read_group( - [('is_published', '=', True), ('category_id', 'in', self.ids)], + [('website_published', '=', True), ('category_id', 'in', self.ids)], ['category_id', 'slide_type'], ['category_id', 'slide_type'], lazy=False) diff --git a/addons/website_slides/models/slide_slide.py b/addons/website_slides/models/slide_slide.py index d369a297afaf..6cb8083536d3 100644 --- a/addons/website_slides/models/slide_slide.py +++ b/addons/website_slides/models/slide_slide.py @@ -289,7 +289,7 @@ class Slide(models.Model): values['index_content'] = values.get('description') if values.get('slide_type') == 'infographic' and not values.get('image_1920'): values['image_1920'] = values['datas'] - if values.get('website_published') and not values.get('date_published'): + if values.get('is_published') and not values.get('date_published'): values['date_published'] = datetime.datetime.now() if values.get('url') and not values.get('document_id'): doc_data = self._parse_document_url(values['url']).get('values', dict()) @@ -298,7 +298,7 @@ class Slide(models.Model): slide = super(Slide, self).create(values) - if slide.website_published: + if slide.is_published: slide._post_publication() return slide @@ -309,7 +309,7 @@ class Slide(models.Model): values.setdefault(key, value) res = super(Slide, self).write(values) - if values.get('website_published'): + if values.get('is_published'): self.date_published = datetime.datetime.now() self._post_publication() return res diff --git a/addons/website_slides/static/src/js/slides_upload.js b/addons/website_slides/static/src/js/slides_upload.js index c5393f070877..0bb37736a7c4 100644 --- a/addons/website_slides/static/src/js/slides_upload.js +++ b/addons/website_slides/static/src/js/slides_upload.js @@ -131,7 +131,7 @@ var SlideUploadDialog = Dialog.extend({ 'description': this._formGetFieldValue('description'), 'index_content': this._formGetFieldValue('index_content'), 'is_preview': this.$('#is_preview').is(':checked'), - 'website_published': forcePublished, + 'is_published': forcePublished, }, this._getSelect2DropdownValues()); // add tags and category // default slide_type (for webpage for instance) diff --git a/addons/website_slides/tests/common.py b/addons/website_slides/tests/common.py index 5be2442d96bf..29d0405dec1d 100644 --- a/addons/website_slides/tests/common.py +++ b/addons/website_slides/tests/common.py @@ -45,7 +45,7 @@ class SlidesCase(common.SavepointCase): 'promote_strategy': 'most_voted', 'enroll': 'public', 'visibility': 'public', - 'website_published': True, + 'is_published': True, 'karma_gen_channel_finish': 100, 'karma_gen_slide_vote': 5, 'karma_gen_channel_rank': 10, @@ -54,7 +54,7 @@ class SlidesCase(common.SavepointCase): 'name': 'How To Cook Humans', 'channel_id': self.channel.id, 'slide_type': 'presentation', - 'website_published': True, + 'is_published': True, 'completion_time': 2.0, }) diff --git a/addons/website_slides/tests/test_karma.py b/addons/website_slides/tests/test_karma.py index 43c390d83851..05cbaa9c9817 100644 --- a/addons/website_slides/tests/test_karma.py +++ b/addons/website_slides/tests/test_karma.py @@ -19,7 +19,7 @@ class TestKarmaGain(common.SlidesCase): 'promote_strategy': 'most_voted', 'enroll': 'public', 'visibility': 'public', - 'website_published': True, + 'is_published': True, 'karma_gen_channel_finish': 100, 'karma_gen_slide_vote': 5, 'karma_gen_channel_rank': 10, @@ -29,14 +29,14 @@ class TestKarmaGain(common.SlidesCase): 'name': 'How to travel through space and time', 'channel_id': self.channel_2.id, 'slide_type': 'presentation', - 'website_published': True, + 'is_published': True, 'completion_time': 2.0, }) self.slide_2_1 = self.env['slide.slide'].with_user(self.user_publisher).create({ 'name': 'How to duplicate yourself', 'channel_id': self.channel_2.id, 'slide_type': 'presentation', - 'website_published': True, + 'is_published': True, 'completion_time': 2.0, }) diff --git a/addons/website_slides/tests/test_security.py b/addons/website_slides/tests/test_security.py index bbbb62bbef3b..6cc498afaf4c 100644 --- a/addons/website_slides/tests/test_security.py +++ b/addons/website_slides/tests/test_security.py @@ -66,7 +66,7 @@ class TestAccess(common.SlidesCase): @mute_logger('odoo.models', 'odoo.addons.base.models.ir_rule') def test_access_channel_publish(self): """ Unpublished channels and their content are visible only to website people """ - self.channel.write({'website_published': False, 'enroll': 'public'}) + self.channel.write({'is_published': False, 'enroll': 'public'}) # channel available only to website self.channel.with_user(self.user_publisher).read(['name']) @@ -97,10 +97,10 @@ class TestAccess(common.SlidesCase): self.slide.with_user(self.user_emp).read(['name']) # publish channel but content unpublished (even if can be previewed) still unavailable - self.channel.write({'website_published': True}) + self.channel.write({'is_published': True}) self.slide.write({ 'is_preview': True, - 'website_published': False, + 'is_published': False, }) self.slide.with_user(self.user_publisher).read(['name']) @@ -134,7 +134,7 @@ class TestAccessFeatures(common.SlidesCase): channel = self.env['slide.channel'].create({ 'name': 'Test', 'enroll': 'invite', - 'website_published': True, + 'is_published': True, 'enroll_group_ids': [(4, self.ref('base.group_user'))] }) diff --git a/addons/website_slides/tests/test_statistics.py b/addons/website_slides/tests/test_statistics.py index 5321eb0c6116..b602679e864b 100644 --- a/addons/website_slides/tests/test_statistics.py +++ b/addons/website_slides/tests/test_statistics.py @@ -21,14 +21,14 @@ class TestStatistics(common.SlidesCase): 'name': 'How To Cook For Humans', 'channel_id': self.channel.id, 'slide_type': 'presentation', - 'website_published': True, + 'is_published': True, 'completion_time': 3.0, }) self.slide_3 = self.env['slide.slide'].with_user(self.user_publisher).create({ 'name': 'How To Cook Humans For Humans', 'channel_id': self.channel.id, 'slide_type': 'document', - 'website_published': True, + 'is_published': True, 'completion_time': 1.5, }) diff --git a/addons/website_slides/views/slide_channel_tag_views.xml b/addons/website_slides/views/slide_channel_tag_views.xml index e2b91f388531..ee838298a611 100644 --- a/addons/website_slides/views/slide_channel_tag_views.xml +++ b/addons/website_slides/views/slide_channel_tag_views.xml @@ -63,9 +63,14 @@ <field name="arch" type="xml"> <form string="Channel Tag Group"> <sheet> + <div class="oe_button_box" name="button_box"> + <button class="oe_stat_button" name="website_publish_button" + type="object" icon="fa-globe"> + <field name="is_published" widget="website_button" help="Makes a menu entry in main navigation of Slides, allowing to filter on its tags directly from main navigation."/> + </button> + </div> <group> <field name="name"/> - <field name="website_published"/> </group> </sheet> </form> @@ -79,7 +84,7 @@ <tree string="Channel Tag Groups"> <field name="sequence" widget="handle"/> <field name="name"/> - <field name="website_published"/> + <field name="is_published" string="Menu Entry"/> </tree> </field> </record> diff --git a/addons/website_slides/views/slide_slide_views.xml b/addons/website_slides/views/slide_slide_views.xml index 5fcb30dbad4c..e380ba4abb8f 100644 --- a/addons/website_slides/views/slide_slide_views.xml +++ b/addons/website_slides/views/slide_slide_views.xml @@ -186,8 +186,8 @@ <field name="arch" type="xml"> <search string="Search Slides"> <field name="name"/> - <filter name="published" string="Published" domain="[('website_published', '=', True)]"/> - <filter name="not_published" string="Waiting for validation" domain="[('website_published', '=', False)]"/> + <filter name="published" string="Published" domain="[('is_published', '=', True)]"/> + <filter name="not_published" string="Waiting for validation" domain="[('is_published', '=', False)]"/> <separator/> <filter string="Archived" name="inactive" domain="[('active','=',False)]"/> <group expand="0" string="Group By"> diff --git a/addons/website_slides_survey/data/gamification_data.xml b/addons/website_slides_survey/data/gamification_data.xml index 8135cabca805..ea7153b796f6 100644 --- a/addons/website_slides_survey/data/gamification_data.xml +++ b/addons/website_slides_survey/data/gamification_data.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="utf-8"?> <odoo><data noupdate="0"> <record id="website_slides.badge_data_certification" model="gamification.badge"> - <field name="website_published" eval="True"/> + <field name="is_published" eval="True"/> </record> <record id="website_slides.badge_data_certification_goal" model="gamification.goal.definition"> <field name="domain">[ diff --git a/addons/website_slides_survey/data/slide_slide_demo.xml b/addons/website_slides_survey/data/slide_slide_demo.xml index bf9cc7c95f92..b3ece42ffca1 100644 --- a/addons/website_slides_survey/data/slide_slide_demo.xml +++ b/addons/website_slides_survey/data/slide_slide_demo.xml @@ -11,7 +11,7 @@ <field name="channel_id" ref="website_slides.slide_channel_demo_5_furn2"/> <field name="category_id" ref="website_slides.slide_category_demo_5_0"/> <field name="survey_id" ref="website_slides_survey.furniture_certification"/> - <field name="website_published" eval="True"/> + <field name="is_published" eval="True"/> <field name="is_preview" eval="False"/> <field name="description">Now that you have completed the course, it's time to test your knowledge!</field> </record> @@ -26,7 +26,7 @@ <field name="channel_id" ref="website_slides.slide_channel_demo_6_furn3"/> <field name="category_id" eval="False"/> <field name="survey_id" ref="website_slides_survey.furniture_certification"/> - <field name="website_published" eval="True"/> + <field name="is_published" eval="True"/> <field name="is_preview" eval="False"/> <field name="description">It's time to test your knowledge!</field> </record> diff --git a/addons/website_slides_survey/tests/test_course_certification_failure.py b/addons/website_slides_survey/tests/test_course_certification_failure.py index c578b7630108..8ddf8ffdab86 100644 --- a/addons/website_slides_survey/tests/test_course_certification_failure.py +++ b/addons/website_slides_survey/tests/test_course_certification_failure.py @@ -45,7 +45,7 @@ class TestCourseCertificationFailureFlow(SurveyCase): 'channel_type': 'training', 'enroll': 'public', 'visibility': 'public', - 'website_published': True, + 'is_published': True, }) # Step 2: link the certification to a slide of type 'certification' @@ -54,7 +54,7 @@ class TestCourseCertificationFailureFlow(SurveyCase): 'channel_id': self.channel.id, 'slide_type': 'certification', 'survey_id': certification.id, - 'website_published': True, + 'is_published': True, }) # Step 3: add public user as member of the channel self.channel._action_add_members(self.user_public.partner_id) diff --git a/doc/howtos/website/course-product b/doc/howtos/website/course-product index 252241150ec2..aa9dc716b496 100644 --- a/doc/howtos/website/course-product +++ b/doc/howtos/website/course-product @@ -35,7 +35,7 @@ diff --git a/academy/demo.xml b/academy/demo.xml + <field name="name">Course 0</field> + <field name="teacher_id" ref="padilla"/> + <field name="public_categ_ids" eval="[(4, ref('academy.category_courses'), False)]"/> -+ <field name="website_published">True</field> ++ <field name="is_published">True</field> + <field name="list_price" type="float">0</field> + <field name="type">service</field> + </record> @@ -43,7 +43,7 @@ diff --git a/academy/demo.xml b/academy/demo.xml + <field name="name">Course 1</field> + <field name="teacher_id" ref="padilla"/> + <field name="public_categ_ids" eval="[(4, ref('academy.category_courses'), False)]"/> -+ <field name="website_published">True</field> ++ <field name="is_published">True</field> + <field name="list_price" type="float">0</field> + <field name="type">service</field> + </record> @@ -51,7 +51,7 @@ diff --git a/academy/demo.xml b/academy/demo.xml + <field name="name">Course 2</field> + <field name="teacher_id" ref="vaughn"/> + <field name="public_categ_ids" eval="[(4, ref('academy.category_courses'), False)]"/> -+ <field name="website_published">True</field> ++ <field name="is_published">True</field> + <field name="list_price" type="float">0</field> + <field name="type">service</field> + </record> -- GitLab