[FIX] website: improve/fix menu, copy on unlink, clone page, unique_path, sale_report, ...

Fix bug from the initial poc of JOV

Fix menu creation
   - creating a menu would create a 'container' menu in the DB (.create is call without website_id)
   then writing on it would copy (if condition to cow) the menu with a website_id leaving the first
   one as a menu container unused.
   - website_menu should always have a website_id
     we dont want to support the multiwebsite system that allow to have generic/specific menu
     unlink/write is useless now since we always have a website_id

Make unique_path website dependent, 2 distinct website can have a page with same name

Make Sale report multiwebsite compliant

Make website_id on sale_order / account.invoice as a related stored from partner_id.

Co-authored-by: Derie Romain <rde@odoo.com>
Co-authored-by: Kersten Jérémy <jke@odoo.com>
This commit is contained in:
Jeremy Kersten
2018-08-13 20:16:34 +02:00
co-authored by Derie Romain
parent a45bb90fac
commit 602807acdf
31 changed files with 261 additions and 224 deletions
+4 -1
View File
@@ -10,7 +10,8 @@
</record>
<record id="main_menu" model="website.menu">
<field name="name">Top Menu</field>
<field name="name">Top Menu</field>
<field name="website_id" ref="default_website"/>
</record>
<record id="menu_homepage" model="website.menu">
@@ -18,6 +19,7 @@
<field name="url">/</field>
<field name="parent_id" ref="website.main_menu"/>
<field name="sequence" type="int">10</field>
<field name="website_id" ref="default_website"/>
</record>
<record id="menu_contactus" model="website.menu">
@@ -25,6 +27,7 @@
<field name="url">/contactus</field>
<field name="parent_id" ref="website.main_menu"/>
<field name="sequence" type="int">60</field>
<field name="website_id" ref="default_website"/>
</record>
<!-- split between ir_ui_view & website_page record to keep external_id on ir_ui_view -->