Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

11375 add new acl module #12

Open
wants to merge 3 commits into
base: 7.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 70 additions & 0 deletions mmx_inventory_access_right/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
:target: https://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3

======================
Inventory Access Right
======================

This Module gets the visibility of inventory information only visible by respective managers.

Installation
============

No specific steps required



Configuration
=============

No configuration steps required



Usage
=====

.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
:alt: Try me on Runbot
:target: https://runbot.odoo-community.org/runbot/153/7.0

Known issues / Roadmap
======================

* ...

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/
project/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed feedback `here <https://github.com/OCA/
project/issues/new?body=module:%20
mmx_inventory_access_right%0Aversion:%20
7.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.


Credits
=======

Contributors
------------

Liping Wang<wang.liping@elico-corp.com>

Maintainer
----------

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

This module is maintained by the OCA.

OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.

To contribute to this module, please visit https://odoo-community.org.
6 changes: 6 additions & 0 deletions mmx_inventory_access_right/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# -*- coding: utf-8 -*-
# © 2015 Elico Corp (https://www.elico-corp.com).
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html)


# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
19 changes: 19 additions & 0 deletions mmx_inventory_access_right/__openerp__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# -*- coding: utf-8 -*-
# © 2015 Elico Corp (https://www.elico-corp.com).
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html)

{
'name': 'MMX Inventory Access Right',
'version': '7.0.1.0.0',
'author': 'Elico Corp',
'website': 'http://www.elico-corp.com',
'depends': ['stock'],
'sequence': 10,
'data': ['security/data.xml', ],
'installable': True,
'application': False,
'auto_install': False,
}


# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
20 changes: 20 additions & 0 deletions mmx_inventory_access_right/security/data.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<openerp>
<data>
<record id="group_product_inventory" model="res.groups">
<field name="name">Product Inventory</field>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see the group but I do not see the modifications in the product form and kanban view.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Before this pull request, warehouse user and warehouse manager can not see product form view or Kanban view.The reason is a lack of access of model "magento.product.product". And ultimately ,warehouse user group can not see "invetory" tab in product form which warehouse manager group can see. So the new group can inherit from warehouse manager group.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure this is the right way.
If you do that the user within this group will have the same access than the manager even if he is user level.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@siyuancn @duanyp1991 can you guys confirm please?

<field name="category_id" ref="base.module_category_warehouse"/>
<field name="implied_ids" eval="[(6,0, [ref('base.group_user'),
ref('stock.group_stock_manager'),])]"/>
</record>

<record id="access_magento_product_product" model="ir.model.access">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is this?

<field name="name">Access Magento Product Product</field>
<field name="model_id" ref="magentoerpconnect.model_magento_product_product"/>
<field name="group_id" ref="group_product_inventory"/>
<field name="active" eval="1"/>
<field eval="1" name="perm_read"/>
</record>

</data>
</openerp>