group_classifieds_moderator wasn't implied by anything an Administrator already has, so a standalone install of just this module (no deployment layer to seed role groups - the exact scenario this module's soft membership-detection is designed for) left the installing admin unable to see the Classifieds app or Moderation queue at all until someone manually granted the group. Make base.group_system imply group_classifieds_moderator instead, so every Odoo Administrator gets it automatically with zero extra wiring. Verified on a from-scratch database with only community_classifieds installed (community_membership and tncsc_deployment both uninstalled): admin's has_group() returns True and "Classifieds" appears in their app switcher immediately after install.
35 lines
1.7 KiB
XML
35 lines
1.7 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
<record id="module_category_classifieds" model="ir.module.category">
|
|
<field name="name">Classifieds</field>
|
|
<field name="sequence">22</field>
|
|
</record>
|
|
|
|
<record id="privilege_classifieds" model="res.groups.privilege">
|
|
<field name="name">Classifieds</field>
|
|
<field name="category_id" ref="module_category_classifieds"/>
|
|
</record>
|
|
|
|
<record id="group_classifieds_moderator" model="res.groups">
|
|
<field name="name">Classifieds Moderator</field>
|
|
<field name="privilege_id" ref="privilege_classifieds"/>
|
|
<field name="implied_ids" eval="[(4, ref('base.group_user'))]"/>
|
|
<field name="comment">Can review, publish, and reject classified listings.</field>
|
|
</record>
|
|
|
|
<!-- This module is meant to run standalone (see soft-detection of
|
|
community_membership in controllers/main.py) - it can't assume a
|
|
deployment layer exists to grant this group to anyone. Without
|
|
this, a fresh install leaves the installing Administrator unable
|
|
to see the Classifieds app or Moderation queue at all, since
|
|
group_classifieds_moderator isn't implied by anything the admin
|
|
already has - a deployment layer can hit the same gap by seeding
|
|
its own client role groups and forgetting to grant this one too.
|
|
Every Odoo Administrator (Settings > Users & Companies > Users >
|
|
Administrator access) gets moderator rights automatically
|
|
instead, so no deployment-layer wiring is required. -->
|
|
<record id="base.group_system" model="res.groups">
|
|
<field name="implied_ids" eval="[(4, ref('group_classifieds_moderator'))]"/>
|
|
</record>
|
|
</odoo>
|