Browse Source

[IMP] review menu definitions and access rights

pull/33/head
robin.keunen 5 years ago
parent
commit
719fa13796
  1. 6
      easy_my_coop/views/account_journal_view.xml
  2. 14
      easy_my_coop/views/menus.xml
  3. 2
      easy_my_coop/views/product_view.xml
  4. 4
      easy_my_coop/views/res_company_view.xml
  5. 12
      easy_my_coop/views/res_partner_view.xml
  6. 10
      easy_my_coop/views/subscription_request_view.xml
  7. 2
      easy_my_coop/wizard/update_partner_info.xml
  8. 4
      easy_my_coop/wizard/update_share_line.xml
  9. 4
      easy_my_coop_dividend/views/dividend_views.xml
  10. 4
      easy_my_coop_recompute_coop_number/wizard/cooperator_number_wizard.xml
  11. 12
      easy_my_coop_taxshelter_report/views/tax_shelter_declaration_view.xml

6
easy_my_coop/views/account_journal_view.xml

@ -6,7 +6,7 @@
<field name="inherit_id" ref="account.view_account_journal_form"/> <field name="inherit_id" ref="account.view_account_journal_form"/>
<field name="arch" type="xml"> <field name="arch" type="xml">
<field name="bank_id" position="after"> <field name="bank_id" position="after">
<field name="get_cooperator_payment" groups="easy_my_coop.group_easy_my_coop_super_manager"/>
<field name="get_cooperator_payment" groups="easy_my_coop.group_easy_my_coop_manager"/>
<field name="get_general_payment"/> <field name="get_general_payment"/>
</field> </field>
</field> </field>
@ -18,9 +18,9 @@
<field name="inherit_id" ref="account.view_account_bank_journal_form"/> <field name="inherit_id" ref="account.view_account_bank_journal_form"/>
<field name="arch" type="xml"> <field name="arch" type="xml">
<field name="currency_id" position="after"> <field name="currency_id" position="after">
<field name="get_cooperator_payment" groups="easy_my_coop.group_easy_my_coop_super_manager"/>
<field name="get_cooperator_payment" groups="easy_my_coop.group_easy_my_coop_manager"/>
<field name="get_general_payment"/> <field name="get_general_payment"/>
</field> </field>
</field> </field>
</record> </record>
</odoo>
</odoo>

14
easy_my_coop/views/menus.xml

@ -6,21 +6,21 @@
<odoo> <odoo>
<menuitem name="Easy-My Coop" id="menu_main_easy_my_coop" groups="easy_my_coop.group_easy_my_coop_user" sequence="40" /> <menuitem name="Easy-My Coop" id="menu_main_easy_my_coop" groups="easy_my_coop.group_easy_my_coop_user" sequence="40" />
<menuitem name="Share Management" id="menu_easy_my_coop_main_subscription" parent="menu_main_easy_my_coop" groups="easy_my_coop.group_easy_my_coop_manager" sequence="10" />
<menuitem name="Share Management" id="menu_easy_my_coop_main_subscription" parent="menu_main_easy_my_coop" groups="easy_my_coop.group_easy_my_coop_user" sequence="10" />
<menuitem name="Subscriptions" id="menu_easy_my_coop_subscription_request" action="subscription_request_action" parent="menu_easy_my_coop_main_subscription" sequence="110" /> <menuitem name="Subscriptions" id="menu_easy_my_coop_subscription_request" action="subscription_request_action" parent="menu_easy_my_coop_main_subscription" sequence="110" />
<menuitem name="Register Payment" id="menu_action_invoice_tree_coop" action="action_invoice_tree_coop" parent="menu_easy_my_coop_main_subscription" groups="easy_my_coop.group_easy_my_coop_user" sequence="130" /> <menuitem name="Register Payment" id="menu_action_invoice_tree_coop" action="action_invoice_tree_coop" parent="menu_easy_my_coop_main_subscription" groups="easy_my_coop.group_easy_my_coop_user" sequence="130" />
<menuitem name="Cooperator Candidates" id="menu_easy_my_coop_cooperator_candidate" action="action_partner_cooperator_candidate_form" parent="menu_easy_my_coop_main_subscription" sequence="140" /> <menuitem name="Cooperator Candidates" id="menu_easy_my_coop_cooperator_candidate" action="action_partner_cooperator_candidate_form" parent="menu_easy_my_coop_main_subscription" sequence="140" />
<menuitem name="Subscription Register" id="menu_easy_my_coop_subscription_register" action="subscription_register_action" parent="menu_easy_my_coop_main_subscription" sequence="150" /> <menuitem name="Subscription Register" id="menu_easy_my_coop_subscription_register" action="subscription_register_action" parent="menu_easy_my_coop_main_subscription" sequence="150" />
<menuitem name="Operation request" id="menu_easy_my_coop_operation_request" action="operation_request_action" parent="menu_easy_my_coop_main_subscription" groups="easy_my_coop.group_easy_my_coop_manager" sequence="160" />
<menuitem name="Share lines" id="menu_easy_my_coop_share_line" action="share_line_action" parent="menu_easy_my_coop_main_subscription" groups="group_easy_my_coop_super_manager" sequence="170" />
<menuitem name="Operation request" id="menu_easy_my_coop_operation_request" action="operation_request_action" parent="menu_easy_my_coop_main_subscription" groups="easy_my_coop.group_easy_my_coop_user" sequence="160" />
<menuitem name="Share lines" id="menu_easy_my_coop_share_line" action="share_line_action" parent="menu_easy_my_coop_main_subscription" groups="group_easy_my_coop_manager" sequence="170" />
<menuitem name="Contacts" id="menu_easy_my_coop_main_coop" parent="menu_main_easy_my_coop" sequence="20"/> <menuitem name="Contacts" id="menu_easy_my_coop_main_coop" parent="menu_main_easy_my_coop" sequence="20"/>
<menuitem name="Cooperators" id="menu_easy_my_coop_cooperator" action="action_partner_cooperator_form" parent="menu_easy_my_coop_main_coop" sequence="210" /> <menuitem name="Cooperators" id="menu_easy_my_coop_cooperator" action="action_partner_cooperator_form" parent="menu_easy_my_coop_main_coop" sequence="210" />
<menuitem name="Company representative" id="menu_easy_my_coop_company_representative" action="action_company_representative_form" parent="menu_easy_my_coop_main_coop" sequence="220" />
<menuitem name="Company representative" id="menu_easy_my_coop_company_representative" action="action_company_representative_form" parent="menu_easy_my_coop_main_coop" groups="base.group_erp_manager" sequence="220" />
<menuitem name="Reporting" id="menu_easy_my_coop_main_reporting" parent="menu_main_easy_my_coop" groups="easy_my_coop.group_easy_my_coop_manager" sequence="30" />
<menuitem name="Reporting" id="menu_easy_my_coop_main_reporting" parent="menu_main_easy_my_coop" groups="easy_my_coop.group_easy_my_coop_user" sequence="30" />
<menuitem name="Configuration" id="menu_easy_my_coop_config" parent="menu_main_easy_my_coop" sequence="40" />
<menuitem name="Configuration" id="menu_easy_my_coop_config" parent="menu_main_easy_my_coop" sequence="40" groups="group_easy_my_coop_manager" />
<menuitem name="Share type" id="menu_easy_my_coop_share_product" action="share_product_action" parent="menu_easy_my_coop_config" sequence="410" /> <menuitem name="Share type" id="menu_easy_my_coop_share_product" action="share_product_action" parent="menu_easy_my_coop_config" sequence="410" />
<menuitem name="Mail Templates" id="menu_easy_my_coop_templates" action="action_easy_my_coop_email_templates" parent="menu_easy_my_coop_config" groups="group_easy_my_coop_manager" sequence="430" />
<menuitem name="Mail Templates" id="menu_easy_my_coop_templates" action="action_easy_my_coop_email_templates" parent="menu_easy_my_coop_config" sequence="430" />
</odoo> </odoo>

2
easy_my_coop/views/product_view.xml

@ -6,7 +6,7 @@
<field name="inherit_id" ref="product.product_template_form_view"/> <field name="inherit_id" ref="product.product_template_form_view"/>
<field name="arch" type="xml"> <field name="arch" type="xml">
<xpath expr="//field[@name='purchase_ok']/.." position="after"> <xpath expr="//field[@name='purchase_ok']/.." position="after">
<div groups="easy_my_coop.group_easy_my_coop_super_manager">
<div groups="easy_my_coop.group_easy_my_coop_manager">
<field name="is_share"/> <field name="is_share"/>
<label for="is_share"/> <label for="is_share"/>
</div> </div>

4
easy_my_coop/views/res_company_view.xml

@ -6,7 +6,7 @@
<field name="model">res.company</field> <field name="model">res.company</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<group name="social_media" position="before"> <group name="social_media" position="before">
<group name="coop_grp" string="EasyMy Coop" groups="easy_my_coop.group_easy_my_coop_manager">
<group name="coop_grp" string="EasyMy Coop" groups="easy_my_coop.group_easy_my_coop_user">
<field name="unmix_share_type"/> <field name="unmix_share_type"/>
<field name="allow_id_card_upload"/> <field name="allow_id_card_upload"/>
<field name="create_user"/> <field name="create_user"/>
@ -31,4 +31,4 @@
</group> </group>
</field> </field>
</record> </record>
</odoo>
</odoo>

12
easy_my_coop/views/res_partner_view.xml

@ -12,10 +12,10 @@
<field name="arch" type="xml"> <field name="arch" type="xml">
<sheet position="before"> <sheet position="before">
<header> <header>
<button id="action_view_create_subscription" string="Create Subscription" name="%(action_view_create_subscription)d"
type="action" context="{'default_active_id': active_id}" groups="easy_my_coop.group_easy_my_coop_manager"/>
<button id="action_view_update_partner_info" string="Update info" name="%(action_view_update_partner_info)d"
type="action" context="{'default_active_id': active_id}" groups="easy_my_coop.group_easy_my_coop_manager"/>
<button string="Create Subscription" name="%(action_view_create_subscription)d"
type="action" context="{'default_active_id': active_id}" groups="easy_my_coop.group_easy_my_coop_user"/>
<button string="Update info" name="%(action_view_update_partner_info)d"
type="action" context="{'default_active_id': active_id}" groups="easy_my_coop.group_easy_my_coop_user"/>
</header> </header>
</sheet> </sheet>
@ -26,8 +26,8 @@
<field name="cooperator_register_number" readonly="True" attrs="{'invisible':[('member','=',False)]}"/> <field name="cooperator_register_number" readonly="True" attrs="{'invisible':[('member','=',False)]}"/>
<field name="company_register_number" readonly="True" attrs="{'invisible':[('is_company','=',False)]}"/> <field name="company_register_number" readonly="True" attrs="{'invisible':[('is_company','=',False)]}"/>
<field name="coop_candidate" groups="easy_my_coop.group_easy_my_coop_user"/> <field name="coop_candidate" groups="easy_my_coop.group_easy_my_coop_user"/>
<field name="cooperator" invisible="True" groups="easy_my_coop.group_easy_my_coop_super_manager"/>
<field name="member" groups="easy_my_coop.group_easy_my_coop_super_manager"/>
<field name="cooperator" invisible="True" groups="easy_my_coop.group_easy_my_coop_manager"/>
<field name="member" groups="easy_my_coop.group_easy_my_coop_manager"/>
<field name="cooperator_type" attrs="{'invisible':[('member','=',False)]}"/> <field name="cooperator_type" attrs="{'invisible':[('member','=',False)]}"/>
<field name="effective_date" attrs="{'invisible':[('member','=',False)]}"/> <field name="effective_date" attrs="{'invisible':[('member','=',False)]}"/>
</group> </group>

10
easy_my_coop/views/subscription_request_view.xml

@ -21,7 +21,7 @@
<field name="validated" invisible="True"/> <field name="validated" invisible="True"/>
<button type="object" string="Validate" aria-label="Validate" name="validate_subscription_request" attrs="{'invisible':['|',('state','!=','draft'),('validated','=',False)]}"/> <button type="object" string="Validate" aria-label="Validate" name="validate_subscription_request" attrs="{'invisible':['|',('state','!=','draft'),('validated','=',False)]}"/>
<button type="object" string="Block" aria-label="Block" name="block_subscription_request" states="draft" groups="easy_my_coop.group_easy_my_coop_user"/> <button type="object" string="Block" aria-label="Block" name="block_subscription_request" states="draft" groups="easy_my_coop.group_easy_my_coop_user"/>
<button type="object" string="Unblock" aria-label="Unblock" name="unblock_subscription_request" states="block" groups="easy_my_coop.group_easy_my_coop_manager"/>
<button type="object" string="Unblock" aria-label="Unblock" name="unblock_subscription_request" states="block" groups="easy_my_coop.group_easy_my_coop_user"/>
</tree> </tree>
</field> </field>
</record> </record>
@ -34,14 +34,14 @@
<header> <header>
<button string="Validate" type="object" name="validate_subscription_request" attrs="{'invisible':['|',('state','not in',['draft','waiting']),('validated','=',False)]}"/> <button string="Validate" type="object" name="validate_subscription_request" attrs="{'invisible':['|',('state','not in',['draft','waiting']),('validated','=',False)]}"/>
<button string="Waiting list" type="object" name="put_on_waiting_list" states="draft"/> <button string="Waiting list" type="object" name="put_on_waiting_list" states="draft"/>
<button string="Cancel" type="object" name="cancel_subscription_request" states="draft,done,block" groups="easy_my_coop.group_easy_my_coop_manager"/>
<button string="Cancel" type="object" name="cancel_subscription_request" states="draft,done,block" groups="easy_my_coop.group_easy_my_coop_user"/>
<field name="state" widget="statusbar" statusbar_visible="draft,cancelled,done,failed"/> <field name="state" widget="statusbar" statusbar_visible="draft,cancelled,done,failed"/>
</header> </header>
<sheet> <sheet>
<group> <group>
<group> <group>
<field name="already_cooperator"/> <field name="already_cooperator"/>
<field name="is_company" groups="easy_my_coop.group_easy_my_coop_super_manager"/>
<field name="is_company" groups="easy_my_coop.group_easy_my_coop_manager"/>
<field name="is_operation" invisible="True"/> <field name="is_operation" invisible="True"/>
<field name="company_name" attrs="{'invisible':[('is_company','=',False)]}"/> <field name="company_name" attrs="{'invisible':[('is_company','=',False)]}"/>
<field name="company_email" attrs="{'invisible':[('is_company','=',False)]}"/> <field name="company_email" attrs="{'invisible':[('is_company','=',False)]}"/>
@ -62,7 +62,7 @@
<field name="country_id" options="{'no_create':True}"/> <field name="country_id" options="{'no_create':True}"/>
</group> </group>
<group> <group>
<field name="capital_release_request_date" groups="easy_my_coop.group_easy_my_coop_super_manager"/>
<field name="capital_release_request_date" groups="easy_my_coop.group_easy_my_coop_manager"/>
<field name="date"/> <field name="date"/>
<field name="source"/> <field name="source"/>
<field name="ordered_parts"/> <field name="ordered_parts"/>
@ -136,7 +136,7 @@
<form string="Share line"> <form string="Share line">
<header> <header>
<button string="Update info" name="%(action_view_update_share_line_info)d" <button string="Update info" name="%(action_view_update_share_line_info)d"
type="action" context="{'default_active_id': active_id}" groups="easy_my_coop.group_easy_my_coop_super_manager"/>
type="action" context="{'default_active_id': active_id}" groups="easy_my_coop.group_easy_my_coop_manager"/>
</header> </header>
<sheet> <sheet>
<group> <group>

2
easy_my_coop/wizard/update_partner_info.xml

@ -33,7 +33,7 @@
<field name="view_type">form</field> <field name="view_type">form</field>
<field name="view_mode">form</field> <field name="view_mode">form</field>
<field name="target">new</field> <field name="target">new</field>
<field name="groups_id" eval="[(4,ref('easy_my_coop.group_easy_my_coop_manager'))]"/>
<field name="groups_id" eval="[(4,ref('easy_my_coop.group_easy_my_coop_user'))]"/>
</record> </record>
</data> </data>

4
easy_my_coop/wizard/update_share_line.xml

@ -29,8 +29,8 @@
<field name="view_type">form</field> <field name="view_type">form</field>
<field name="view_mode">form</field> <field name="view_mode">form</field>
<field name="target">new</field> <field name="target">new</field>
<field name="groups_id" eval="[(4,ref('easy_my_coop.group_easy_my_coop_super_manager'))]"/>
<field name="groups_id" eval="[(4,ref('easy_my_coop.group_easy_my_coop_manager'))]"/>
</record> </record>
</data> </data>
</odoo>
</odoo>

4
easy_my_coop_dividend/views/dividend_views.xml

@ -1,6 +1,6 @@
<odoo> <odoo>
<data> <data>
<menuitem name="Dividend" id="menu_easy_my_coop_main_dividend" parent="easy_my_coop.menu_main_easy_my_coop" groups="easy_my_coop.group_easy_my_coop_manager" sequence="30" />
<menuitem name="Dividend" id="menu_easy_my_coop_main_dividend" parent="easy_my_coop.menu_main_easy_my_coop" groups="easy_my_coop.group_easy_my_coop_user" sequence="30" />
<record id="dividend_year_form" model="ir.ui.view"> <record id="dividend_year_form" model="ir.ui.view">
<field name="name">dividend.year.form</field> <field name="name">dividend.year.form</field>
@ -161,4 +161,4 @@
<menuitem action="dividend_line_action" name="Dividend lines" id="menu_dividend_line" parent="menu_easy_my_coop_main_dividend" sequence="30"/> <menuitem action="dividend_line_action" name="Dividend lines" id="menu_dividend_line" parent="menu_easy_my_coop_main_dividend" sequence="30"/>
</data> </data>
</odoo>
</odoo>

4
easy_my_coop_recompute_coop_number/wizard/cooperator_number_wizard.xml

@ -29,7 +29,7 @@
<field name="multi">True</field> <field name="multi">True</field>
</record> </record>
<menuitem id="menu_register_number_wizard" parent="easy_my_coop.menu_easy_my_coop_config" action="action_register_number_wizard" sequence="30" groups="easy_my_coop.group_easy_my_coop_super_manager"/>
<menuitem id="menu_register_number_wizard" parent="easy_my_coop.menu_easy_my_coop_config" action="action_register_number_wizard" sequence="30" groups="easy_my_coop.group_easy_my_coop_manager"/>
</data> </data>
</openerp>
</openerp>

12
easy_my_coop_taxshelter_report/views/tax_shelter_declaration_view.xml

@ -9,9 +9,9 @@
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Tax shelter declaration"> <form string="Tax shelter declaration">
<header> <header>
<button name="compute_declaration" string="Process Declaration" type="object" states="draft" class="oe_highlight" groups="easy_my_coop.group_easy_my_coop_manager"/>
<button name="validate_declaration" string="Validate Declaration" type="object" states="computed" groups="easy_my_coop.group_easy_my_coop_manager"/>
<button name="reset_declaration" string="Reset Declaration" type="object" states="computed" groups="easy_my_coop.group_easy_my_coop_manager"/>
<button name="compute_declaration" string="Process Declaration" type="object" states="draft" class="oe_highlight" groups="easy_my_coop.group_easy_my_coop_user"/>
<button name="validate_declaration" string="Validate Declaration" type="object" states="computed" groups="easy_my_coop.group_easy_my_coop_user"/>
<button name="reset_declaration" string="Reset Declaration" type="object" states="computed" groups="easy_my_coop.group_easy_my_coop_user"/>
<field name="state" widget="statusbar"/> <field name="state" widget="statusbar"/>
</header> </header>
<sheet> <sheet>
@ -73,7 +73,7 @@
<field name="view_id" ref="tax_shelter_declaration_tree"/> <field name="view_id" ref="tax_shelter_declaration_tree"/>
</record> </record>
<menuitem action="tax_shelter_declaration_action" name="Tax Shelter Declaration" id="menu_tax_shelter_declaration" parent="menu_easy_my_coop_main_declaration" sequence="10" groups="easy_my_coop.group_easy_my_coop_manager"/>
<menuitem action="tax_shelter_declaration_action" name="Tax Shelter Declaration" id="menu_tax_shelter_declaration" parent="menu_easy_my_coop_main_declaration" sequence="10" groups="easy_my_coop.group_easy_my_coop_user"/>
<record id="tax_shelter_certificate_form" model="ir.ui.view"> <record id="tax_shelter_certificate_form" model="ir.ui.view">
<field name="name">tax.shelter.certificate.form</field> <field name="name">tax.shelter.certificate.form</field>
@ -196,6 +196,6 @@
<field name="view_id" ref="tax_shelter_certificate_tree"/> <field name="view_id" ref="tax_shelter_certificate_tree"/>
</record> </record>
<menuitem action="tax_shelter_certificate_action" name="Tax Shelter Certificates" id="menu_tax_shelter_certificate" parent="menu_easy_my_coop_main_declaration" sequence="20" groups="easy_my_coop.group_easy_my_coop_manager"/>
<menuitem action="tax_shelter_certificate_action" name="Tax Shelter Certificates" id="menu_tax_shelter_certificate" parent="menu_easy_my_coop_main_declaration" sequence="20" groups="easy_my_coop.group_easy_my_coop_user"/>
</data> </data>
</odoo>
</odoo>
Loading…
Cancel
Save