This commit is contained in:
gsinghpal
2026-03-14 12:04:20 -04:00
parent fc3c966484
commit e9cf75ee48
75 changed files with 6991 additions and 873 deletions

View File

@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- Add chatter preferences to the "other_preferences" group in user preferences form -->
<record id="view_users_form_chatter_prefs" model="ir.ui.view">
<field name="name">res.users.form.chatter.prefs</field>
<field name="model">res.users</field>
<field name="inherit_id" ref="base.view_users_form_simple_modif"/>
<field name="arch" type="xml">
<xpath expr="//group[@name='other_preferences']" position="inside">
<label for="chatter_position"/>
<div>
<field name="chatter_position" widget="radio"/>
</div>
<label for="chatter_hidden"/>
<div>
<field name="chatter_hidden"/>
</div>
</xpath>
</field>
</record>
</odoo>

View File

@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!--
Inject chatter preferences into localStorage BEFORE the asset bundle loads.
This runs as an inline script right after the Odoo bootstrap script,
guaranteeing the values are available before our IIFE in the bundle executes.
-->
<template id="chatter_prefs_inject" inherit_id="web.layout" name="Chatter Preferences Early Inject">
<xpath expr="//script[@id='web.layout.odooscript']" position="after">
<t t-if="request.session.uid">
<script type="text/javascript">
(function(){
try {
localStorage.setItem('fce_chatter_position', '<t t-esc="request.env.user.chatter_position or 'side'"/>');
localStorage.setItem('fce_chatter_hidden', '<t t-esc="'1' if request.env.user.chatter_hidden else '0'"/>');
} catch(e){}
})();
</script>
</t>
</xpath>
</template>
</odoo>