[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:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user