Merge lp:~openerp-dev/openobject-addons/trunk-replace-inherit_option_id-xmo into lp:openobject-addons
- trunk-replace-inherit_option_id-xmo
- Merge into trunk
Status: | Needs review |
---|---|
Proposed branch: | lp:~openerp-dev/openobject-addons/trunk-replace-inherit_option_id-xmo |
Merge into: | lp:openobject-addons |
Diff against target: |
907 lines (+159/-150) 18 files modified
website/controllers/main.py (+30/-36) website/models/ir_ui_view.py (+38/-29) website/static/src/js/website.ace.js (+1/-1) website/static/src/js/website.editor.js (+8/-2) website/views/themes.xml (+12/-12) website/views/website_templates.xml (+23/-23) website_blog/views/website_blog_templates.xml (+12/-12) website_crm/views/website_crm.xml (+2/-2) website_crm_partner_assign/views/website_crm_partner_assign.xml (+1/-1) website_customer/views/website_customer.xml (+3/-3) website_event/views/website_event.xml (+6/-6) website_event_sale/views/website_event_sale.xml (+1/-1) website_event_track/views/website_event.xml (+3/-3) website_hr/views/website_hr.xml (+1/-1) website_hr_recruitment/views/templates.xml (+2/-2) website_membership/views/website_membership.xml (+2/-2) website_quote/views/website_quotation.xml (+3/-3) website_sale/views/website_sale.xml (+11/-11) |
To merge this branch: | bzr merge lp:~openerp-dev/openobject-addons/trunk-replace-inherit_option_id-xmo |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Olivier Dony (Odoo) | Pending | ||
Review via email:
|
Commit message
Description of the change
Replaces inherit_option_id by a 3-state selection
Corresponding server changes at https:/
Unmerged revisions
- 9424. By Xavier (Open ERP)
-
[FIX] website: inherit_option_id -> application
- 9423. By Xavier (Open ERP)
-
[IMP] renamed some stuff for clarity
- 9422. By Xavier (Open ERP)
-
[IMP] dict(int: True) -> set(int)
- 9421. By Xavier (Open ERP)
-
[IMP] use set to collect inherit_id and inherit_option_id
Also add a few comments to note understanding of code
- 9420. By Xavier (Open ERP)
-
[IMP] use sets to check for groups/ACL
rco notes that group tests are generally intersections, if the user has *any*
group set on the object he can see/use it. This change is a literal
translation of the original semantics, which may be wrong. - 9419. By Xavier (Open ERP)
-
[IMP] no need to ensure an actual context if the method does not use it
just forwarding the context object does not count as using it, if callees want
a context they can ensure they've got one on their own - 9418. By Xavier (Open ERP)
-
[IMP] don't pointlessly recreate view_obj every time _views_get is called, better use of pool & data APIs
- 9417. By Xavier (Open ERP)
-
[IMP] use sorted + key instead of sort + cmp
- 9416. By Xavier (Open ERP)
-
[REM] unused stack_result
Preview Diff
1 | === modified file 'website/controllers/main.py' |
2 | --- website/controllers/main.py 2014-05-05 16:38:41 +0000 |
3 | +++ website/controllers/main.py 2014-05-06 12:31:51 +0000 |
4 | @@ -112,22 +112,25 @@ |
5 | @http.route('/website/theme_change', type='http', auth="user", website=True) |
6 | def theme_change(self, theme_id=False, **kwargs): |
7 | imd = request.registry['ir.model.data'] |
8 | - view = request.registry['ir.ui.view'] |
9 | + Views = request.registry['ir.ui.view'] |
10 | |
11 | - view_model, view_option_id = imd.get_object_reference( |
12 | + _, theme_template_id = imd.get_object_reference( |
13 | request.cr, request.uid, 'website', 'theme') |
14 | - views = view.search( |
15 | - request.cr, request.uid, [('inherit_id', '=', view_option_id)], |
16 | - context=request.context) |
17 | - view.write(request.cr, request.uid, views, {'inherit_id': False}, |
18 | - context=request.context) |
19 | + views = Views.search(request.cr, request.uid, [ |
20 | + ('inherit_id', '=', theme_template_id), |
21 | + ('application', '=', 'enabled'), |
22 | + ], context=request.context) |
23 | + Views.write(request.cr, request.uid, views, { |
24 | + 'application': 'disabled', |
25 | + }, context=request.context) |
26 | |
27 | if theme_id: |
28 | module, xml_id = theme_id.split('.') |
29 | - view_model, view_id = imd.get_object_reference( |
30 | + _, view_id = imd.get_object_reference( |
31 | request.cr, request.uid, module, xml_id) |
32 | - view.write(request.cr, request.uid, [view_id], |
33 | - {'inherit_id': view_option_id}, context=request.context) |
34 | + Views.write(request.cr, request.uid, [view_id], { |
35 | + 'application': 'enabled' |
36 | + }, context=request.context) |
37 | |
38 | return request.render('website.themes', {'theme_changed': True}) |
39 | |
40 | @@ -151,54 +154,45 @@ |
41 | module_obj.button_immediate_upgrade(request.cr, request.uid, module_ids, context=request.context) |
42 | return request.redirect(redirect) |
43 | |
44 | - @http.route('/website/customize_template_toggle', type='json', auth='user', website=True) |
45 | - def customize_template_set(self, view_id): |
46 | - view_obj = request.registry.get("ir.ui.view") |
47 | - view = view_obj.browse(request.cr, request.uid, int(view_id), |
48 | - context=request.context) |
49 | - if view.inherit_id: |
50 | - value = False |
51 | - else: |
52 | - value = view.inherit_option_id and view.inherit_option_id.id or False |
53 | - view_obj.write(request.cr, request.uid, [view_id], { |
54 | - 'inherit_id': value |
55 | - }, context=request.context) |
56 | - return True |
57 | - |
58 | @http.route('/website/customize_template_get', type='json', auth='user', website=True) |
59 | - def customize_template_get(self, xml_id, optional=True): |
60 | + def customize_template_get(self, xml_id, full=False): |
61 | + """ Lists the templates customizing ``xml_id``. By default, only |
62 | + returns optional templates (which can be toggled on and off), if |
63 | + ``full=True`` returns all templates customizing ``xml_id`` |
64 | + """ |
65 | imd = request.registry['ir.model.data'] |
66 | view_model, view_theme_id = imd.get_object_reference( |
67 | request.cr, request.uid, 'website', 'theme') |
68 | |
69 | - user = request.registry['res.users'].browse(request.cr, request.uid, request.uid, request.context) |
70 | - group_ids = [g.id for g in user.groups_id] |
71 | + user = request.registry['res.users']\ |
72 | + .browse(request.cr, request.uid, request.uid, request.context) |
73 | + user_groups = set(user.groups_id) |
74 | |
75 | - view = request.registry.get("ir.ui.view") |
76 | - views = view._views_get(request.cr, request.uid, xml_id, context=request.context) |
77 | - done = {} |
78 | + views = request.registry["ir.ui.view"]\ |
79 | + ._views_get(request.cr, request.uid, xml_id, context=request.context) |
80 | + done = set() |
81 | result = [] |
82 | for v in views: |
83 | - if v.groups_id and [g for g in v.groups_id if g.id not in group_ids]: |
84 | + if not user_groups.issuperset(v.groups_id): |
85 | continue |
86 | - if v.inherit_option_id and v.inherit_option_id.id != view_theme_id or not optional: |
87 | - if v.inherit_option_id.id not in done: |
88 | + if full or (v.application != 'always' and v.inherit_id.id != view_theme_id): |
89 | + if v.inherit_id not in done: |
90 | result.append({ |
91 | - 'name': v.inherit_option_id.name, |
92 | + 'name': v.inherit_id.name, |
93 | 'id': v.id, |
94 | 'xml_id': v.xml_id, |
95 | 'inherit_id': v.inherit_id.id, |
96 | 'header': True, |
97 | 'active': False |
98 | }) |
99 | - done[v.inherit_option_id.id] = True |
100 | + done.add(v.inherit_id) |
101 | result.append({ |
102 | 'name': v.name, |
103 | 'id': v.id, |
104 | 'xml_id': v.xml_id, |
105 | 'inherit_id': v.inherit_id.id, |
106 | 'header': False, |
107 | - 'active': (v.inherit_id.id == v.inherit_option_id.id) or (not optional and v.inherit_id.id) |
108 | + 'active': v.application in ('always', 'enabled'), |
109 | }) |
110 | return result |
111 | |
112 | |
113 | === modified file 'website/models/ir_ui_view.py' |
114 | --- website/models/ir_ui_view.py 2014-05-05 16:38:41 +0000 |
115 | +++ website/models/ir_ui_view.py 2014-05-06 12:31:51 +0000 |
116 | @@ -13,8 +13,6 @@ |
117 | class view(osv.osv): |
118 | _inherit = "ir.ui.view" |
119 | _columns = { |
120 | - 'inherit_option_id': fields.many2one('ir.ui.view','Optional Inheritancy'), |
121 | - 'inherited_option_ids': fields.one2many('ir.ui.view','inherit_option_id','Optional Inheritancies'), |
122 | 'page': fields.boolean("Whether this view is a web page template (complete)"), |
123 | 'website_meta_title': fields.char("Website meta title", size=70, translate=True), |
124 | 'website_meta_description': fields.text("Website meta description", size=160, translate=True), |
125 | @@ -24,25 +22,30 @@ |
126 | 'page': False, |
127 | } |
128 | |
129 | + |
130 | + def _view_obj(self, cr, uid, view_id, context=None): |
131 | + if isinstance(view_id, basestring): |
132 | + return self.pool['ir.model.data'].xmlid_to_object( |
133 | + cr, uid, view_id, raise_if_not_found=True, context=context |
134 | + ) |
135 | + elif isinstance(view_id, (int, long)): |
136 | + return self.browse(cr, uid, view_id, context=context) |
137 | + |
138 | + # assume it's already a view object (WTF?) |
139 | + return view_id |
140 | + |
141 | # Returns all views (called and inherited) related to a view |
142 | # Used by translation mechanism, SEO and optional templates |
143 | - def _views_get(self, cr, uid, view, options=True, context=None, root=True, stack_result=None): |
144 | - if not context: |
145 | - context = {} |
146 | - if not stack_result: |
147 | - stack_result = [] |
148 | - |
149 | - def view_obj(view): |
150 | - if isinstance(view, basestring): |
151 | - mod_obj = self.pool.get("ir.model.data") |
152 | - m, n = view.split('.') |
153 | - view = mod_obj.get_object(cr, uid, m, n, context=context) |
154 | - elif isinstance(view, (int, long)): |
155 | - view = self.pool.get("ir.ui.view").browse(cr, uid, view, context=context) |
156 | - return view |
157 | - |
158 | + def _views_get(self, cr, uid, view_id, options=True, context=None, root=True): |
159 | + """ For a given view ``view_id``, should return: |
160 | + |
161 | + * the view itself |
162 | + * all views inheriting from it, enabled or not |
163 | + - but not the optional children of a non-enabled child |
164 | + * all views called from it (via t-call) |
165 | + """ |
166 | try: |
167 | - view = view_obj(view) |
168 | + view = self._view_obj(cr, uid, view_id, context=context) |
169 | except ValueError: |
170 | # Shall we log that ? |
171 | return [] |
172 | @@ -55,19 +58,25 @@ |
173 | node = etree.fromstring(view.arch) |
174 | for child in node.xpath("//t[@t-call]"): |
175 | try: |
176 | - call_view = view_obj(child.get('t-call')) |
177 | + called_view = self._view_obj(cr, uid, child.get('t-call'), context=context) |
178 | except ValueError: |
179 | continue |
180 | - if call_view not in result: |
181 | - result += self._views_get(cr, uid, call_view, options=options, context=context, stack_result=result) |
182 | - |
183 | - todo = view.inherit_children_ids |
184 | - if options: |
185 | - todo += filter(lambda x: not x.inherit_id, view.inherited_option_ids) |
186 | - # Keep options in a determinitic order whatever their enabled disabled status |
187 | - todo.sort(lambda x,y:cmp(x.id,y.id)) |
188 | - for child_view in todo: |
189 | - for r in self._views_get(cr, uid, child_view, options=bool(child_view.inherit_id), context=context, root=False, stack_result=result): |
190 | + if called_view not in result: |
191 | + result += self._views_get(cr, uid, called_view, options=options, context=context) |
192 | + |
193 | + extensions = view.inherit_children_ids |
194 | + if not options: |
195 | + # only active children |
196 | + extensions = (v for v in view.inherit_children_ids |
197 | + if v.application in ('always', 'enabled')) |
198 | + |
199 | + # Keep options in a deterministic order regardless of their applicability |
200 | + for extension in sorted(extensions, key=lambda v: v.id): |
201 | + for r in self._views_get( |
202 | + cr, uid, extension, |
203 | + # only return optional grandchildren if this child is enabled |
204 | + options=extension.application in ('always', 'enabled'), |
205 | + context=context, root=False): |
206 | if r not in result: |
207 | result.append(r) |
208 | return result |
209 | |
210 | === modified file 'website/static/src/js/website.ace.js' |
211 | --- website/static/src/js/website.ace.js 2014-02-25 16:57:20 +0000 |
212 | +++ website/static/src/js/website.ace.js 2014-05-06 12:31:51 +0000 |
213 | @@ -97,7 +97,7 @@ |
214 | var viewId = $(document.documentElement).data('view-xmlid'); |
215 | openerp.jsonRpc('/website/customize_template_get', 'call', { |
216 | 'xml_id': viewId, |
217 | - 'optional': false, |
218 | + 'full': true, |
219 | }).then(function (views) { |
220 | self.loadViews.call(self, views); |
221 | self.open.call(self); |
222 | |
223 | === modified file 'website/static/src/js/website.editor.js' |
224 | --- website/static/src/js/website.editor.js 2014-04-23 15:48:52 +0000 |
225 | +++ website/static/src/js/website.editor.js 2014-05-06 12:31:51 +0000 |
226 | @@ -470,8 +470,14 @@ |
227 | }); |
228 | menu.on('click', 'a[data-action!=ace]', function (event) { |
229 | var view_id = $(event.currentTarget).data('view-id'); |
230 | - openerp.jsonRpc('/website/customize_template_toggle', 'call', { |
231 | - 'view_id': view_id |
232 | + return openerp.jsonRpc('/web/dataset/call_kw', 'call', { |
233 | + model: 'ir.ui.view', |
234 | + method: 'toggle', |
235 | + args: [], |
236 | + kwargs: { |
237 | + ids: [parseInt(view_id, 10)], |
238 | + context: website.get_context() |
239 | + } |
240 | }).then( function() { |
241 | window.location.reload(); |
242 | }); |
243 | |
244 | === modified file 'website/views/themes.xml' |
245 | --- website/views/themes.xml 2014-03-14 13:46:42 +0000 |
246 | +++ website/views/themes.xml 2014-05-06 12:31:51 +0000 |
247 | @@ -203,82 +203,82 @@ |
248 | All Default Themes |
249 | --> |
250 | |
251 | - <template id="website.theme_amelia" name="Amelia" inherit_option_id="website.theme"> |
252 | + <template id="website.theme_amelia" name="Amelia" inherit_id="website.theme" optional="disabled"> |
253 | <xpath expr="//link[@id='bootstrap_css']" position="replace"> |
254 | <link rel='stylesheet' href='/website/static/src/css/bootswatch/amelia.min.css' t-ignore="true"/> |
255 | <link rel='stylesheet' href='/website/static/src/css/bootswatch/amelia.fix.css' t-ignore="true"/> |
256 | </xpath> |
257 | </template> |
258 | |
259 | - <template id="website.theme_cerulean" name="Cerulean" inherit_option_id="website.theme"> |
260 | + <template id="website.theme_cerulean" name="Cerulean" inherit_id="website.theme" optional="disabled"> |
261 | <xpath expr="//link[@id='bootstrap_css']" position="replace"> |
262 | <link rel='stylesheet' href='/website/static/src/css/bootswatch/cerulean.min.css' t-ignore="true"/> |
263 | </xpath> |
264 | </template> |
265 | |
266 | - <template id="website.theme_cosmo" name="Cosmo" inherit_option_id="website.theme"> |
267 | + <template id="website.theme_cosmo" name="Cosmo" inherit_id="website.theme" optional="disabled"> |
268 | <xpath expr="//link[@id='bootstrap_css']" position="replace"> |
269 | <link rel='stylesheet' href='/website/static/src/css/bootswatch/cosmo.min.css' t-ignore="true"/> |
270 | <link rel='stylesheet' href='/website/static/src/css/bootswatch/cosmo.fix.css' t-ignore="true"/> |
271 | </xpath> |
272 | </template> |
273 | |
274 | - <template id="website.theme_cyborg" name="Cyborg" inherit_option_id="website.theme"> |
275 | + <template id="website.theme_cyborg" name="Cyborg" inherit_id="website.theme" optional="disabled"> |
276 | <xpath expr="//link[@id='bootstrap_css']" position="replace"> |
277 | <link rel='stylesheet' href='/website/static/src/css/bootswatch/cyborg.min.css' t-ignore="true"/> |
278 | <link rel='stylesheet' href='/website/static/src/css/bootswatch/cyborg.fix.css' t-ignore="true"/> |
279 | </xpath> |
280 | </template> |
281 | |
282 | - <template id="website.theme_flatly" name="Flatly" inherit_option_id="website.theme"> |
283 | + <template id="website.theme_flatly" name="Flatly" inherit_id="website.theme" optional="disabled"> |
284 | <xpath expr="//link[@id='bootstrap_css']" position="replace"> |
285 | <link rel='stylesheet' href='/website/static/src/css/bootswatch/flatly.min.css' t-ignore="true"/> |
286 | <link rel='stylesheet' href='/website/static/src/css/bootswatch/flatly.fix.css' t-ignore="true"/> |
287 | </xpath> |
288 | </template> |
289 | |
290 | - <template id="website.theme_journal" name="Journal" inherit_option_id="website.theme"> |
291 | + <template id="website.theme_journal" name="Journal" inherit_id="website.theme" optional="disabled"> |
292 | <xpath expr="//link[@id='bootstrap_css']" position="replace"> |
293 | <link rel='stylesheet' href='/website/static/src/css/bootswatch/journal.min.css' t-ignore="true"/> |
294 | <link rel='stylesheet' href='/website/static/src/css/bootswatch/journal.fix.css' t-ignore="true"/> |
295 | </xpath> |
296 | </template> |
297 | |
298 | - <template id="website.theme_readable" name="Readable" inherit_option_id="website.theme"> |
299 | + <template id="website.theme_readable" name="Readable" inherit_id="website.theme" optional="disabled"> |
300 | <xpath expr="//link[@id='bootstrap_css']" position="replace"> |
301 | <link rel='stylesheet' href='/website/static/src/css/bootswatch/readable.min.css' t-ignore="true"/> |
302 | <link rel='stylesheet' href='/website/static/src/css/bootswatch/readable.fix.css' t-ignore="true"/> |
303 | </xpath> |
304 | </template> |
305 | |
306 | - <template id="website.theme_simplex" name="Simplex" inherit_option_id="website.theme"> |
307 | + <template id="website.theme_simplex" name="Simplex" inherit_id="website.theme" optional="disabled"> |
308 | <xpath expr="//link[@id='bootstrap_css']" position="replace"> |
309 | <link rel='stylesheet' href='/website/static/src/css/bootswatch/simplex.min.css' t-ignore="true"/> |
310 | <link rel='stylesheet' href='/website/static/src/css/bootswatch/simplex.fix.css' t-ignore="true"/> |
311 | </xpath> |
312 | </template> |
313 | |
314 | - <template id="website.theme_slate" name="Slate" inherit_option_id="website.theme"> |
315 | + <template id="website.theme_slate" name="Slate" inherit_id="website.theme" optional="disabled"> |
316 | <xpath expr="//link[@id='bootstrap_css']" position="replace"> |
317 | <link rel='stylesheet' href='/website/static/src/css/bootswatch/slate.min.css' t-ignore="true"/> |
318 | <link rel='stylesheet' href='/website/static/src/css/bootswatch/slate.fix.css' t-ignore="true"/> |
319 | </xpath> |
320 | </template> |
321 | |
322 | - <template id="website.theme_spacelab" name="Spacelab" inherit_option_id="website.theme"> |
323 | + <template id="website.theme_spacelab" name="Spacelab" inherit_id="website.theme" optional="disabled"> |
324 | <xpath expr="//link[@id='bootstrap_css']" position="replace"> |
325 | <link rel='stylesheet' href='/website/static/src/css/bootswatch/spacelab.min.css' t-ignore="true"/> |
326 | <link rel='stylesheet' href='/website/static/src/css/bootswatch/spacelab.fix.css' t-ignore="true"/> |
327 | </xpath> |
328 | </template> |
329 | |
330 | - <template id="website.theme_united" name="United" inherit_option_id="website.theme"> |
331 | + <template id="website.theme_united" name="United" inherit_id="website.theme" optional="disabled"> |
332 | <xpath expr="//link[@id='bootstrap_css']" position="replace"> |
333 | <link rel='stylesheet' href='/website/static/src/css/bootswatch/united.min.css' t-ignore="true"/> |
334 | </xpath> |
335 | </template> |
336 | |
337 | - <template id="website.theme_yeti" name="Yeti" inherit_option_id="website.theme"> |
338 | + <template id="website.theme_yeti" name="Yeti" inherit_id="website.theme" optional="disabled"> |
339 | <xpath expr="//link[@id='bootstrap_css']" position="replace"> |
340 | <link rel='stylesheet' href='/website/static/src/css/bootswatch/yeti.min.css' t-ignore="true"/> |
341 | <link rel='stylesheet' href='/website/static/src/css/bootswatch/yeti.fix.css' t-ignore="true"/> |
342 | |
343 | === modified file 'website/views/website_templates.xml' |
344 | --- website/views/website_templates.xml 2014-05-01 15:56:33 +0000 |
345 | +++ website/views/website_templates.xml 2014-05-06 12:31:51 +0000 |
346 | @@ -215,7 +215,7 @@ |
347 | </html> |
348 | </template> |
349 | |
350 | -<template id="layout_logo_show" inherit_id="website.layout" inherit_option_id="website.layout" name="Show Logo"> |
351 | +<template id="layout_logo_show" inherit_id="website.layout" optional="enabled" name="Show Logo"> |
352 | <xpath expr="//header//a[@class='navbar-brand']" position="replace"> |
353 | <a href="/" class="navbar-brand logo"> |
354 | <img src="/logo.png"/> |
355 | @@ -261,43 +261,43 @@ |
356 | <script type="text/javascript"> |
357 | var CKEDITOR_BASEPATH = '/web/static/lib/ckeditor/'; |
358 | </script> |
359 | - <link rel='stylesheet' href='/website/static/src/css/snippets.css'/> |
360 | - <link rel='stylesheet' href='/website/static/src/css/editor.css'/> |
361 | + <link rel='stylesheet' href='/website/static/src/css/snippets.css'/> |
362 | + <link rel='stylesheet' href='/website/static/src/css/editor.css'/> |
363 | |
364 | <link rel='stylesheet' href="/web/static/lib/jquery.ui/css/smoothness/jquery-ui-1.9.1.custom.css"/> |
365 | |
366 | - <link rel="stylesheet" href="/web/static/lib/select2/select2.css"/> |
367 | - <link rel="stylesheet" href="/website/static/lib/select2-bootstrap-css/select2-bootstrap.css"/> |
368 | - |
369 | - <script type="text/javascript" src="/web/static/lib/select2/select2.js"></script> |
370 | - |
371 | - <script type="text/javascript" src="/web/static/lib/ckeditor/ckeditor.js"></script> |
372 | + <link rel="stylesheet" href="/web/static/lib/select2/select2.css"/> |
373 | + <link rel="stylesheet" href="/website/static/lib/select2-bootstrap-css/select2-bootstrap.css"/> |
374 | + |
375 | + <script type="text/javascript" src="/web/static/lib/select2/select2.js"></script> |
376 | + |
377 | + <script type="text/javascript" src="/web/static/lib/ckeditor/ckeditor.js"></script> |
378 | <script type="text/javascript" src="/website/static/lib/ace/ace.js"></script> |
379 | <script type="text/javascript" src="/website/static/lib/ace/theme-monokai.js"></script> |
380 | <script type="text/javascript" src="/website/static/lib/ace/mode-xml.js"></script> |
381 | - <script type="text/javascript" src="/website/static/lib/vkbeautify/vkbeautify.0.99.00.beta.js"></script> |
382 | - <script type="text/javascript" src="/web/static/lib/jquery.ui/js/jquery-ui-1.9.1.custom.js"></script> |
383 | - <!-- mutation observers shim backed by mutation events (8 < IE < 11, Safari < 6, FF < 14, Chrome < 17) --> |
384 | - <script type="text/javascript" src="/website/static/lib//jquery.mjs.nestedSortable/jquery.mjs.nestedSortable.js"></script> |
385 | - <script type="text/javascript" src="/website/static/lib/MutationObservers/test/sidetable.js"></script> |
386 | - <script type="text/javascript" src='/website/static/lib/nearest/jquery.nearest.js'></script> |
387 | - <script type="text/javascript" src="/website/static/lib/MutationObservers/MutationObserver.js"></script> |
388 | + <script type="text/javascript" src="/website/static/lib/vkbeautify/vkbeautify.0.99.00.beta.js"></script> |
389 | + <script type="text/javascript" src="/web/static/lib/jquery.ui/js/jquery-ui-1.9.1.custom.js"></script> |
390 | + <!-- mutation observers shim backed by mutation events (8 < IE < 11, Safari < 6, FF < 14, Chrome < 17) --> |
391 | + <script type="text/javascript" src="/website/static/lib//jquery.mjs.nestedSortable/jquery.mjs.nestedSortable.js"></script> |
392 | + <script type="text/javascript" src="/website/static/lib/MutationObservers/test/sidetable.js"></script> |
393 | + <script type="text/javascript" src='/website/static/lib/nearest/jquery.nearest.js'></script> |
394 | + <script type="text/javascript" src="/website/static/lib/MutationObservers/MutationObserver.js"></script> |
395 | |
396 | - <script type="text/javascript" src="/website/static/src/js/website.editor.js"></script> |
397 | + <script type="text/javascript" src="/website/static/src/js/website.editor.js"></script> |
398 | <script type="text/javascript" src="/website/static/src/js/website.editor.newpage.js"></script> <!-- groups="base.group_website_designer" --> |
399 | <script type="text/javascript" src="/website/static/src/js/website.menu.js"></script> <!-- groups="base.group_website_designer" --> |
400 | - <script type="text/javascript" src="/website/static/src/js/website.mobile.js"></script> |
401 | - <script type="text/javascript" src="/website/static/src/js/website.seo.js"></script> |
402 | + <script type="text/javascript" src="/website/static/src/js/website.mobile.js"></script> |
403 | + <script type="text/javascript" src="/website/static/src/js/website.seo.js"></script> |
404 | <script type="text/javascript" src="/website/static/src/js/website.tour.js"></script> |
405 | <script type="text/javascript" src="/website/static/src/js/website.tour.banner.js"></script> <!-- groups="base.group_website_designer" --> |
406 | <script type="text/javascript" src="/website/static/src/js/website.snippets.editor.js"></script> |
407 | <script type="text/javascript" src="/website/static/src/js/website.ace.js"></script> |
408 | <script type="text/javascript" src="/website/static/src/js/website.translator.js"></script> |
409 | |
410 | - <script type="text/javascript" src="/website/static/src/js/jQuery.transfo.js"></script> |
411 | + <script type="text/javascript" src="/website/static/src/js/jQuery.transfo.js"></script> |
412 | </template> |
413 | |
414 | -<template id="debugger" inherit_option_id="website.layout" name="Debugger & Tests"> |
415 | +<template id="debugger" inherit_id="website.layout" optional="disabled" name="Debugger & Tests"> |
416 | <xpath expr='//t[@name="layout_head"]' position="after"> |
417 | <script type="text/javascript" src="/website/static/src/js/website.tour.js"></script> |
418 | </xpath> |
419 | @@ -311,7 +311,7 @@ |
420 | </xpath> |
421 | </template> |
422 | |
423 | -<template id="show_sign_in" inherit_option_id="website.layout" inherit_id="website.layout" name="Show Sign In" groups="base.group_public"> |
424 | +<template id="show_sign_in" optional="enabled" inherit_id="website.layout" name="Show Sign In" groups="base.group_public"> |
425 | <xpath expr="//ul[@id='top_menu']" position="inside"> |
426 | <li class="divider"/> |
427 | <li> |
428 | @@ -322,7 +322,7 @@ |
429 | </xpath> |
430 | </template> |
431 | |
432 | -<template id="footer_custom" inherit_option_id="website.layout" name="Custom Footer"> |
433 | +<template id="footer_custom" inherit_id="website.layout" optional="disabled" name="Custom Footer"> |
434 | <xpath expr="//div[@id='footer_container']" position="before"> |
435 | <div class="oe_structure"> |
436 | <section data-snippet-id='three-columns' class="mt16 mb16"> |
437 | |
438 | === modified file 'website_blog/views/website_blog_templates.xml' |
439 | --- website_blog/views/website_blog_templates.xml 2014-04-25 10:17:53 +0000 |
440 | +++ website_blog/views/website_blog_templates.xml 2014-05-06 12:31:51 +0000 |
441 | @@ -161,7 +161,7 @@ |
442 | |
443 | <!-- Option: Blog Post List: show tags --> |
444 | <template id="opt_blog_post_short_tags" name="Tags" |
445 | - inherit_option_id="website_blog.blog_post_short" inherit_id="website_blog.blog_post_short"> |
446 | + optional="enabled" inherit_id="website_blog.blog_post_short"> |
447 | <xpath expr="//div[@name='blog_post_data']" position="inside"> |
448 | <p class="post-meta text-muted text-center" t-if="len(blog_post.tag_ids)"> |
449 | <span class="fa fa-tags"/> |
450 | @@ -264,7 +264,7 @@ |
451 | |
452 | <!-- Options: Blog Post: breadcrumb --> |
453 | <template id="blog_breadcrumb" name="Breadcrumb" |
454 | - inherit_option_id="website_blog.blog_post_complete"> |
455 | + inherit_id="website_blog.blog_post_complete" optional="disabled"> |
456 | <xpath expr="//div[@id='title']" position="before"> |
457 | <div class="container"> |
458 | <div class="row"> |
459 | @@ -284,7 +284,7 @@ |
460 | |
461 | <!-- Options: Blog Post: user can reply --> |
462 | <template id="opt_blog_post_complete_comment" name="Allow blog post comment" |
463 | - inherit_option_id="website_blog.blog_post_complete" |
464 | + inherit_id="website_blog.blog_post_complete" optional="disabled" |
465 | groups="website_mail.group_comment"> |
466 | <xpath expr="//ul[@id='comments-list']" position="before"> |
467 | <section class="mb32 read_width css_editable_mode_hidden"> |
468 | @@ -306,7 +306,7 @@ |
469 | |
470 | <!-- Options: Blog Post: user can select text for tweet --> |
471 | <template id="opt_blog_post_select_to_tweet" name="Select to Tweet" |
472 | - inherit_option_id="website_blog.blog_post_complete"> |
473 | + inherit_id="website_blog.blog_post_complete" optional="disabled"> |
474 | <xpath expr="//div[@id='blog_content']" position="attributes"> |
475 | <attribute name="class">js_tweet mt32</attribute> |
476 | </xpath> |
477 | @@ -317,7 +317,7 @@ |
478 | |
479 | <!-- Options: Blog Post: user can add Inline Discussion --> |
480 | <template id="opt_blog_post_inline_discussion" name="Allow comment in text" |
481 | - inherit_option_id="website_blog.blog_post_complete"> |
482 | + inherit_id="website_blog.blog_post_complete" optional="disabled"> |
483 | <xpath expr="//div[@id='blog_content']" position="attributes"> |
484 | <attribute name="enable_chatter_discuss">True</attribute> |
485 | </xpath> |
486 | @@ -325,7 +325,7 @@ |
487 | |
488 | <!-- Options: Blog Post: show tags --> |
489 | <template id="opt_blog_post_complete_tags" name="Tags" |
490 | - inherit_option_id="website_blog.blog_post_complete" inherit_id="website_blog.blog_post_complete"> |
491 | + optional="enabled" inherit_id="website_blog.blog_post_complete"> |
492 | <xpath expr="//p[@name='blog_post_data']" position="after"> |
493 | <p class="post-meta text-muted text-center" t-if="len(blog_post.tag_ids)"> |
494 | <span class="fa fa-tags"/> |
495 | @@ -354,7 +354,7 @@ |
496 | <!-- Option:Right Column for extra info --> |
497 | |
498 | <template id="index_right" name="Right Column" |
499 | - inherit_option_id="website_blog.blog_post_short"> |
500 | + inherit_id="website_blog.blog_post_short" optional="disabled"> |
501 | <xpath expr="//div[@id='main_column']" position="attributes"> |
502 | <attribute name="class">col-sm-8</attribute> |
503 | </xpath> |
504 | @@ -365,7 +365,7 @@ |
505 | |
506 | <!-- Option:Right Column: tags --> |
507 | <template id="opt_blog_rc_tags" name="Tags" |
508 | - inherit_option_id="website_blog.index_right"> |
509 | + inherit_id="website_blog.index_right" optional="disabled"> |
510 | <xpath expr="//div[@id='blog_right_column']" position="inside"> |
511 | <section class="mt32"> |
512 | <h4>Tags</h4> |
513 | @@ -382,7 +382,7 @@ |
514 | |
515 | <!-- Option:Right Column: archives --> |
516 | <template id="opt_blog_rc_history" name="Archives" |
517 | - inherit_option_id="website_blog.index_right"> |
518 | + inherit_id="website_blog.index_right" optional="disabled"> |
519 | <xpath expr="//div[@id='blog_right_column']" position="inside"> |
520 | <section class="mt32"> |
521 | <h4>Archives</h4> |
522 | @@ -399,7 +399,7 @@ |
523 | |
524 | <!-- Option:Right Column: about us --> |
525 | <template id="opt_blog_rc_about_us" name="About Us" priority="2" |
526 | - inherit_option_id="website_blog.index_right"> |
527 | + inherit_id="website_blog.index_right" optional="disabled"> |
528 | <xpath expr="//div[@id='blog_right_column']" position="inside"> |
529 | <section class="mt32"> |
530 | <h4>About us</h4> |
531 | @@ -416,7 +416,7 @@ |
532 | |
533 | <!-- Option:Right Column: follow us --> |
534 | <template id="opt_blog_rc_follow_us" name="Follow us" priority="4" |
535 | - inherit_option_id="website_blog.index_right"> |
536 | + inherit_id="website_blog.index_right" optional="disabled"> |
537 | <xpath expr="//div[@id='blog_right_column']" position="inside"> |
538 | <section class="mt32"> |
539 | <h4>Follow us<small t-if="blog">: <t t-esc="blog.name"/></small></h4> |
540 | @@ -443,7 +443,7 @@ |
541 | |
542 | <!-- Option:Right Column: blogs --> |
543 | <template id="opt_blog_rc_blogs" name="Our Blogs" priority="6" |
544 | - inherit_option_id="website_blog.index_right"> |
545 | + inherit_id="website_blog.index_right" optional="disabled"> |
546 | <xpath expr="//div[@id='blog_right_column']" position="inside"> |
547 | <section class="mt32 mb32"> |
548 | <h4>Our Blogs</h4> |
549 | |
550 | === modified file 'website_crm/views/website_crm.xml' |
551 | --- website_crm/views/website_crm.xml 2014-04-08 14:41:10 +0000 |
552 | +++ website_crm/views/website_crm.xml 2014-05-06 12:31:51 +0000 |
553 | @@ -2,7 +2,7 @@ |
554 | <openerp> |
555 | <data> |
556 | |
557 | -<template id="contactus_form" name="Contact Form" inherit_id="website.contactus" inherit_option_id="website.contactus"> |
558 | +<template id="contactus_form" name="Contact Form" inherit_id="website.contactus" optional="enabled"> |
559 | <xpath expr="//div[@name='mail_button']" position="replace"> |
560 | <form action="/crm/contactus" method="post" class="form-horizontal mt32" enctype="multipart/form-data"> |
561 | <t t-foreach="kwargs" t-as="kwarg"> |
562 | @@ -47,7 +47,7 @@ |
563 | </xpath> |
564 | </template> |
565 | |
566 | -<template id="contactus_form_company_name" name="Company Name" inherit_id="website_crm.contactus_form" inherit_option_id="website_crm.contactus_form"> |
567 | +<template id="contactus_form_company_name" name="Company Name" inherit_id="website_crm.contactus_form" optional="enabled"> |
568 | <xpath expr="//div[@name='email_from_container']" position="after"> |
569 | <div t-attf-class="form-group #{error and 'partner_name' in error and 'has-error' or ''}"> |
570 | <label class="col-md-3 col-sm-4 control-label" for="partner_name">Your Company</label> |
571 | |
572 | === modified file 'website_crm_partner_assign/views/website_crm_partner_assign.xml' |
573 | --- website_crm_partner_assign/views/website_crm_partner_assign.xml 2014-03-14 16:23:46 +0000 |
574 | +++ website_crm_partner_assign/views/website_crm_partner_assign.xml 2014-05-06 12:31:51 +0000 |
575 | @@ -108,7 +108,7 @@ |
576 | </t> |
577 | </template> |
578 | |
579 | -<template id="ref_country" inherit_id="website_crm_partner_assign.index" inherit_option_id="website_crm_partner_assign.index" name="Left World Map"> |
580 | +<template id="ref_country" inherit_id="website_crm_partner_assign.index" optional="enabled" name="Left World Map"> |
581 | <xpath expr="//ul[@id='reseller_countries']" position="after"> |
582 | <h3>World Map</h3> |
583 | <ul class="nav"> |
584 | |
585 | === modified file 'website_customer/views/website_customer.xml' |
586 | --- website_customer/views/website_customer.xml 2014-03-14 16:23:46 +0000 |
587 | +++ website_customer/views/website_customer.xml 2014-05-06 12:31:51 +0000 |
588 | @@ -65,7 +65,7 @@ |
589 | </template> |
590 | |
591 | <!-- Option: left column: World Map --> |
592 | -<template id="opt_country" inherit_option_id="website_customer.index" name="Show Map"> |
593 | +<template id="opt_country" inherit_id="website_customer.index" optional="disabled" name="Show Map"> |
594 | <xpath expr="//div[@id='ref_left_column']" position="inside"> |
595 | |
596 | <iframe t-attf-src="/google_map/?partner_ids=#{ google_map_partner_ids }&partner_url=/customers/&output=embed" |
597 | @@ -73,7 +73,7 @@ |
598 | </xpath> |
599 | </template> |
600 | |
601 | -<template id="opt_country_list" inherit_id="website_customer.index" inherit_option_id="website_customer.index" name="Filter on Countries"> |
602 | +<template id="opt_country_list" inherit_id="website_customer.index" optional="enabled" name="Filter on Countries"> |
603 | <xpath expr="//div[@id='ref_left_column']" position="inside"> |
604 | <h3>References by Country</h3> |
605 | <ul class="nav nav-pills nav-stacked mt16 mb32"> |
606 | @@ -119,7 +119,7 @@ |
607 | </t> |
608 | </template> |
609 | |
610 | -<template id="partner_assign" inherit_option_id="website_customer.details" inherit_id="website_customer.details" name="Implemented By"> |
611 | +<template id="partner_assign" optional="enabled" inherit_id="website_customer.details" name="Implemented By"> |
612 | <xpath expr="//div[@id='left_column']" position="inside"> |
613 | <t t-if="assigned_partner_data"> |
614 | <div class="panel panel-default"> |
615 | |
616 | === modified file 'website_event/views/website_event.xml' |
617 | --- website_event/views/website_event.xml 2014-05-01 20:01:50 +0000 |
618 | +++ website_event/views/website_event.xml 2014-05-06 12:31:51 +0000 |
619 | @@ -87,7 +87,7 @@ |
620 | </t> |
621 | </template> |
622 | |
623 | -<template id="event_right_photos" inherit_option_id="website_event.index" name="Photos"> |
624 | +<template id="event_right_photos" inherit_id="website_event.index" optional="disabled" name="Photos"> |
625 | <xpath expr="//div[@id='right_column']" position="inside"> |
626 | <div class="row"> |
627 | <div class="col-md-12 mb16"> |
628 | @@ -106,7 +106,7 @@ |
629 | </xpath> |
630 | </template> |
631 | |
632 | -<template id="event_right_quotes" inherit_option_id="website_event.index" name="Quotes"> |
633 | +<template id="event_right_quotes" inherit_id="website_event.index" optional="disabled" name="Quotes"> |
634 | <xpath expr="//div[@id='right_column']" position="inside"> |
635 | <div class="row"> |
636 | <div class="col-md-12 mb16"> |
637 | @@ -123,7 +123,7 @@ |
638 | </xpath> |
639 | </template> |
640 | |
641 | -<template id="event_right_country_event" inherit_option_id="website_event.index" name="Country Events"> |
642 | +<template id="event_right_country_event" inherit_id="website_event.index" optional="disabled" name="Country Events"> |
643 | <xpath expr="//div[@id='right_column']" position="inside"> |
644 | <div class="row"> |
645 | <div class="col-md-12 mb16 mt16 country_events"> |
646 | @@ -140,7 +140,7 @@ |
647 | </xpath> |
648 | </template> |
649 | |
650 | -<template id="event_left_column" inherit_option_id="website_event.index" inherit_id="website_event.index" name="Filters"> |
651 | +<template id="event_left_column" optional="enabled" inherit_id="website_event.index" name="Filters"> |
652 | <xpath expr="//div[@id='middle_column']" position="attributes"> |
653 | <attribute name="class">col-md-6</attribute> |
654 | </xpath> |
655 | @@ -159,7 +159,7 @@ |
656 | </xpath> |
657 | </template> |
658 | |
659 | -<template id="event_category" inherit_option_id="website_event.event_left_column" name="Filter by Category"> |
660 | +<template id="event_category" inherit_id="website_event.event_left_column" optional="disabled" name="Filter by Category"> |
661 | <xpath expr="//div[@id='left_column']" position="inside"> |
662 | <ul class="nav nav-pills nav-stacked mt32"> |
663 | <t t-foreach="types"> |
664 | @@ -173,7 +173,7 @@ |
665 | </xpath> |
666 | </template> |
667 | |
668 | -<template id="event_location" inherit_option_id="website_event.event_left_column" name="Filter by Country"> |
669 | +<template id="event_location" inherit_id="website_event.event_left_column" optional="disabled" name="Filter by Country"> |
670 | <xpath expr="//div[@id='left_column']" position="inside"> |
671 | <ul class="nav nav-pills nav-stacked mt32"> |
672 | <t t-foreach="countries"> |
673 | |
674 | === modified file 'website_event_sale/views/website_event_sale.xml' |
675 | --- website_event_sale/views/website_event_sale.xml 2014-04-24 13:45:33 +0000 |
676 | +++ website_event_sale/views/website_event_sale.xml 2014-05-06 12:31:51 +0000 |
677 | @@ -26,7 +26,7 @@ |
678 | </xpath> |
679 | </template> |
680 | |
681 | -<template id="event_description_full" inherit_id="website_event.event_description_full" inherit_option_id="website_event.event_description_full" name="Event's Ticket form"> |
682 | +<template id="event_description_full" inherit_id="website_event.event_description_full" optional="enabled" name="Event's Ticket form"> |
683 | <xpath expr="//div[@t-field='event.description']" position="before"> |
684 | <form t-attf-action="/event/add_cart?event_id=#{ event.id }" method="post" t-if="event.event_ticket_ids"> |
685 | <table itemprop="offers" class="table table-striped"> |
686 | |
687 | === modified file 'website_event_track/views/website_event.xml' |
688 | --- website_event_track/views/website_event.xml 2014-04-09 18:43:34 +0000 |
689 | +++ website_event_track/views/website_event.xml 2014-05-06 12:31:51 +0000 |
690 | @@ -2,7 +2,7 @@ |
691 | <openerp> |
692 | <data> |
693 | |
694 | -<template name="Sponsors" id="event_sponsor" inherit_option_id="website_event.layout" inherit_id="website_event.layout"> |
695 | +<template name="Sponsors" id="event_sponsor" optional="enabled" inherit_id="website_event.layout"> |
696 | <xpath expr="//t[@t-call='website.layout']" position="inside"> |
697 | <t t-set="head"> |
698 | <link rel='stylesheet' href='/website_event_track/static/src/css/website_event_track.css'/> |
699 | @@ -155,7 +155,7 @@ |
700 | </t> |
701 | </template> |
702 | |
703 | -<template id="tracks_filter" inherit_id="website_event_track.tracks" inherit_option_id="website_event_track.tracks" name="Filter on Tags"> |
704 | +<template id="tracks_filter" inherit_id="website_event_track.tracks" optional="enabled" name="Filter on Tags"> |
705 | <xpath expr="//div[@id='left_column']" position="inside"> |
706 | <ul class="nav nav-pills nav-stacked"> |
707 | <li t-att-class="'' if searches.get('tag') else 'active'"><a t-attf-href="/event/#{ slug(event) }/track">All Tags</a></li> |
708 | @@ -244,7 +244,7 @@ |
709 | </t> |
710 | </template> |
711 | |
712 | -<template id="event_track_social" name="Social Widgets" inherit_option_id="website_event_track.track_view"> |
713 | +<template id="event_track_social" name="Social Widgets" inherit_id="website_event_track.track_view" optional="disabled"> |
714 | <xpath expr="//div[@id='right_column']" position="inside"> |
715 | <div class="panel panel-default"> |
716 | <div class="panel-heading"> |
717 | |
718 | === modified file 'website_hr/views/website_hr.xml' |
719 | --- website_hr/views/website_hr.xml 2013-12-12 10:58:21 +0000 |
720 | +++ website_hr/views/website_hr.xml 2014-05-06 12:31:51 +0000 |
721 | @@ -3,7 +3,7 @@ |
722 | <data> |
723 | <!-- Page --> |
724 | |
725 | -<template id="aboutus" inherit_id="website.aboutus" inherit_option_id="website.aboutus" name="Our Team"> |
726 | +<template id="aboutus" inherit_id="website.aboutus" optional="enabled" name="Our Team"> |
727 | <xpath expr="//div[@class='oe_structure']" position="after"> |
728 | <section class="container"> |
729 | <div class="col-sm-12 text-center" t-if="len(employee_ids)"> |
730 | |
731 | === modified file 'website_hr_recruitment/views/templates.xml' |
732 | --- website_hr_recruitment/views/templates.xml 2014-04-25 10:17:53 +0000 |
733 | +++ website_hr_recruitment/views/templates.xml 2014-05-06 12:31:51 +0000 |
734 | @@ -230,7 +230,7 @@ |
735 | </t> |
736 | </template> |
737 | |
738 | -<template id="job_departments" inherit_option_id="website_hr_recruitment.index" name="Filter by Departments"> |
739 | +<template id="job_departments" inherit_id="website_hr_recruitment.index" optional="disabled" name="Filter by Departments"> |
740 | <xpath expr="//div[@id='jobs_grid_left']" position="inside"> |
741 | <ul class="nav nav-pills nav-stacked mb32"> |
742 | <li t-att-class=" '' if department_id else 'active' "><a href="/jobs">All Departments</a></li> |
743 | @@ -249,7 +249,7 @@ |
744 | </xpath> |
745 | </template> |
746 | |
747 | -<template id="job_offices" inherit_option_id="website_hr_recruitment.index" name="Filter by Offices"> |
748 | +<template id="job_offices" inherit_id="website_hr_recruitment.index" optional="disabled" name="Filter by Offices"> |
749 | <xpath expr="//div[@id='jobs_grid_left']" position="inside"> |
750 | <ul class="nav nav-pills nav-stacked mb32"> |
751 | <li t-att-class=" '' if office_id else 'active' "><a href="/jobs">All Offices</a></li> |
752 | |
753 | === modified file 'website_membership/views/website_membership.xml' |
754 | --- website_membership/views/website_membership.xml 2014-03-17 06:14:19 +0000 |
755 | +++ website_membership/views/website_membership.xml 2014-05-06 12:31:51 +0000 |
756 | @@ -81,7 +81,7 @@ |
757 | </template> |
758 | |
759 | <template id="opt_index_country" name="Location" |
760 | - inherit_option_id="website_membership.index" inherit_id="website_membership.index"> |
761 | + optional="enabled" inherit_id="website_membership.index"> |
762 | <xpath expr="//div[@id='left_column']/ul[last()]" position="after"> |
763 | <ul class="nav nav-pills nav-stacked mt16"> |
764 | <li class="nav-header"><h3>Location</h3></li> |
765 | @@ -98,7 +98,7 @@ |
766 | |
767 | <!-- Option: index: Left Google Map --> |
768 | <template id="opt_index_google_map" name="Left World Map" |
769 | - inherit_option_id="website_membership.index" inherit_id="website_membership.index"> |
770 | + optional="enabled" inherit_id="website_membership.index"> |
771 | <xpath expr="//div[@id='left_column']/ul[1]" position="before"> |
772 | <ul class="nav nav-pills nav-stacked mt16"> |
773 | <li class="nav-header"><h3>World Map</h3></li> |
774 | |
775 | === modified file 'website_quote/views/website_quotation.xml' |
776 | --- website_quote/views/website_quotation.xml 2014-01-28 20:50:17 +0000 |
777 | +++ website_quote/views/website_quotation.xml 2014-05-06 12:31:51 +0000 |
778 | @@ -92,7 +92,7 @@ |
779 | </section> |
780 | </template> |
781 | |
782 | - <template id="change_quantity" inherit_option_id="website_quote.pricing" name="Change Quantity"> |
783 | + <template id="change_quantity" inherit_id="website_quote.pricing" optional="disabled" name="Change Quantity"> |
784 | <xpath expr="//div[@id='quote_qty']" position="replace"> |
785 | <div class="input-group"> |
786 | <span class="input-group-addon hidden-print"> |
787 | @@ -130,7 +130,7 @@ |
788 | </template> |
789 | |
790 | <!-- Options:Quotation Chatter: user can reply --> |
791 | - <template id="opt_quotation_chatter_post_complete_comment" name="Allow Comments" inherit_option_id="website_quote.chatter" inherit_id="website_quote.chatter"> |
792 | + <template id="opt_quotation_chatter_post_complete_comment" name="Allow Comments" optional="enabled" inherit_id="website_quote.chatter"> |
793 | <xpath expr="//h1" position="after"> |
794 | <section class="mb32 css_editable_mode_hidden hidden-print"> |
795 | <form id="comment" t-attf-action="/quote/#{quotation.id}/#{quotation.access_token}/post" method="POST"> |
796 | @@ -388,7 +388,7 @@ |
797 | </template> |
798 | |
799 | <!-- Options:Quotation Signature --> |
800 | - <template id="opt_quotation_signature" name="Ask Signature" inherit_option_id="website_quote.so_quotation" inherit_id="website_quote.so_quotation"> |
801 | + <template id="opt_quotation_signature" name="Ask Signature" optional="enabled" inherit_id="website_quote.so_quotation"> |
802 | <xpath expr="//div[@id='sign-dialog']" position="inside"> |
803 | <div class="panel panel-default mt16 mb0" id="drawsign"> |
804 | <div class="panel-heading"> |
805 | |
806 | === modified file 'website_sale/views/website_sale.xml' |
807 | --- website_sale/views/website_sale.xml 2014-04-25 10:17:53 +0000 |
808 | +++ website_sale/views/website_sale.xml 2014-05-06 12:31:51 +0000 |
809 | @@ -221,7 +221,7 @@ |
810 | |
811 | <!-- Product Description--> |
812 | |
813 | -<template id="product_description" inherit_option_id="website_sale.products_cart" name="Product Description"> |
814 | +<template id="product_description" inherit_id="website_sale.products_cart" optional="disabled" name="Product Description"> |
815 | <xpath expr="//div[@class='product_price']" position="before"> |
816 | <div class="text-info oe_subdescription" contenteditable="false"> |
817 | <div itemprop="description" t-field="product.description_sale"></div> |
818 | @@ -231,7 +231,7 @@ |
819 | |
820 | <!-- Add to cart button--> |
821 | |
822 | -<template id="add_to_basket" inherit_option_id="website_sale.products_cart" name="Add to Cart"> |
823 | +<template id="add_to_basket" inherit_id="website_sale.products_cart" optional="disabled" name="Add to Cart"> |
824 | <xpath expr="//div[@class='product_price']" position="inside"> |
825 | <form action="/shop/add_cart" method="post" style="display: inline-block;"> |
826 | <input name="product_id" t-att-value="product.product_variant_ids[0].id" type="hidden"/> |
827 | @@ -242,7 +242,7 @@ |
828 | |
829 | <!-- List view of products --> |
830 | |
831 | -<template id="list_view" inherit_option_id="website_sale.products" name="List View"> |
832 | +<template id="list_view" inherit_id="website_sale.products" optional="disabled" name="List View"> |
833 | <xpath expr="//div[@id='products_grid']//table" position="replace"> |
834 | <t t-foreach="products" t-as="product"> |
835 | <div class="oe_product oe_list oe_product_cart" t-att-data-publish="product.website_published and 'on' or 'off'"> |
836 | @@ -362,7 +362,7 @@ |
837 | </template> |
838 | |
839 | <!-- Product option: related / recommended products --> |
840 | -<template id="recommended_products" inherit_id="website_sale.product" inherit_option_id="website_sale.product" name="Recommended Products"> |
841 | +<template id="recommended_products" inherit_id="website_sale.product" optional="enabled" name="Recommended Products"> |
842 | <xpath expr="//div[@id='product_full_description']" position="after"> |
843 | <div class="container mt32" t-if="product.recommended_products()"> |
844 | <h3>Customers who have bought this product also bought:</h3> |
845 | @@ -387,7 +387,7 @@ |
846 | </template> |
847 | |
848 | <!-- Product option: attributes --> |
849 | -<template id="product_attributes" inherit_id="website_sale.product" inherit_option_id="website_sale.product" name="Product attributes" groups="product.group_product_attributes"> |
850 | +<template id="product_attributes" inherit_id="website_sale.product" optional="enabled" name="Product attributes" groups="product.group_product_attributes"> |
851 | <xpath expr="//p[@t-field='product.description_sale']" position="after"> |
852 | <hr t-if="product.attribute_lines"/> |
853 | <p class="text-muted"> |
854 | @@ -398,7 +398,7 @@ |
855 | </template> |
856 | |
857 | <!-- Product options: OpenChatter --> |
858 | -<template id="product_option_openchatter" inherit_option_id="website_sale.product" name="Discussion"> |
859 | +<template id="product_option_openchatter" inherit_id="website_sale.product" optional="disabled" name="Discussion"> |
860 | <xpath expr="//div[@t-field='product.website_description']" position="after"> |
861 | <hr class="mb32"/> |
862 | <section class="container"> |
863 | @@ -569,7 +569,7 @@ |
864 | </template> |
865 | |
866 | |
867 | -<template id="continue_shopping" inherit_id="website_sale.mycart" inherit_option_id="website_sale.mycart" name="Continue Shopping Button"> |
868 | +<template id="continue_shopping" inherit_id="website_sale.mycart" optional="enabled" name="Continue Shopping Button"> |
869 | <xpath expr="//a[@href='/shop/checkout']" position="before"> |
870 | <a href="/shop" class="btn btn-default mb32"><span class="fa fa-long-arrow-left"/> Continue Shopping</a> |
871 | </xpath> |
872 | @@ -578,7 +578,7 @@ |
873 | |
874 | <!-- Page Shop --> |
875 | |
876 | -<template id="products_categories" inherit_option_id="website_sale.products" name="Product Categories"> |
877 | +<template id="products_categories" inherit_id="website_sale.products" optional="disabled" name="Product Categories"> |
878 | <xpath expr="//div[@id='products_grid_before']" position="inside"> |
879 | <ul class="nav nav-pills nav-stacked mt16"> |
880 | <li t-att-class=" '' if category else 'active' "><a href="/shop">All Products</a></li> |
881 | @@ -595,7 +595,7 @@ |
882 | </xpath> |
883 | </template> |
884 | |
885 | -<template id="products_attributes" inherit_id="website_sale.products" inherit_option_id="website_sale.products" name="Product attribute's Filters" groups="product.group_product_attributes"> |
886 | +<template id="products_attributes" inherit_id="website_sale.products" optional="enabled" name="Product attribute's Filters" groups="product.group_product_attributes"> |
887 | <xpath expr="//div[@id='products_grid_before']" position="inside"> |
888 | <form t-attf-action="/shop/filters?{{ keep_query('search', category=(category and int(category))) }}" class="attributes" method="post"> |
889 | <ul class="nav nav-pills nav-stacked mt16"> |
890 | @@ -639,7 +639,7 @@ |
891 | </xpath> |
892 | </template> |
893 | |
894 | -<template id="suggested_products_list" inherit_id="website_sale.mycart" inherit_option_id="website_sale.mycart" name="Suggested Products in my cart"> |
895 | +<template id="suggested_products_list" inherit_id="website_sale.mycart" optional="enabled" name="Suggested Products in my cart"> |
896 | <xpath expr="//table[@id='mycart_products']" position="after"> |
897 | <table t-if="suggested_products" class='table table-striped table-condensed'> |
898 | <colgroup> |
899 | @@ -695,7 +695,7 @@ |
900 | </xpath> |
901 | </template> |
902 | |
903 | -<template id="reduction_code" inherit_option_id="website_sale.mycart" name="Reduction Code"> |
904 | +<template id="reduction_code" inherit_id="website_sale.mycart" optional="disabled" name="Reduction Code"> |
905 | <xpath expr="//div[@id='right_column']" position="inside"> |
906 | <h4>Coupon Code</h4> |
907 | <p> |