[ADD] Added website_id in client side context.
This allow us to comply to the 'ids' argument of website's model method (if needed) bzr revid: fme@openerp.com-20131025074343-6nqgte7lzj7uhopj
This commit is contained in:
parent
a597cc59ef
commit
ec09c0fa2c
|
@ -12,7 +12,8 @@
|
|||
website.get_context = function (dict) {
|
||||
var html = document.documentElement;
|
||||
return _.extend({
|
||||
lang: html.getAttribute('lang').replace('-', '_')
|
||||
lang: html.getAttribute('lang').replace('-', '_'),
|
||||
website_id: html.getAttribute('data-website-id')|0
|
||||
}, dict);
|
||||
};
|
||||
|
||||
|
|
|
@ -29,9 +29,9 @@
|
|||
</li>
|
||||
</template>
|
||||
|
||||
<template id="layout" name="Main layout">
|
||||
<!DOCTYPE html>
|
||||
<template id="layout" name="Main layout"><!DOCTYPE html>
|
||||
<html t-att-lang="lang.replace('_', '-')"
|
||||
t-att-data-website-id="website.id if editable else None"
|
||||
t-att-data-editable="'1' if editable else None"
|
||||
t-att-data-translatable="'1' if translatable else None"
|
||||
t-att-data-view-xmlid="xmlid if editable else None"
|
||||
|
|
Loading…
Reference in New Issue