@ -0,0 +1,49 @@ |
|||
.. image:: https://img.shields.io/badge/license-AGPL--3-blue.svg |
|||
:target: https://www.gnu.org/licenses/agpl-3.0-standalone.html |
|||
:alt: License: AGPL-3 |
|||
|
|||
All In One Hide Print Button |
|||
================ |
|||
This module will help you to hide print button per user. |
|||
|
|||
Configuration |
|||
============= |
|||
* No additional configurations needed |
|||
|
|||
Company |
|||
------- |
|||
* `Cybrosys Techno Solutions <https://cybrosys.com/>`__ |
|||
|
|||
License |
|||
------- |
|||
Affero General Public License v3.0 (AGPL v3) |
|||
(https://www.gnu.org/licenses/agpl-3.0-standalone.html) |
|||
|
|||
Credits |
|||
------- |
|||
Developer: (v16)Amaya Aravind @ Cybrosys |
|||
(v17)JANISH BABU EK @ cybrosys, ASWIN A K @ cybrosys, |
|||
(v18) Ranjith R, |
|||
Contact: odoo@cybrosys.com |
|||
|
|||
Contacts |
|||
-------- |
|||
* Mail Contact : odoo@cybrosys.com |
|||
* Website : https://cybrosys.com |
|||
|
|||
Bug Tracker |
|||
----------- |
|||
Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. |
|||
|
|||
Maintainer |
|||
========== |
|||
.. image:: https://cybrosys.com/images/logo.png |
|||
:target: https://cybrosys.com |
|||
|
|||
This module is maintained by Cybrosys Technologies. |
|||
|
|||
For support and more information, please visit `Our Website <https://cybrosys.com/>`__ |
|||
|
|||
Further information |
|||
=================== |
|||
HTML Description: `<static/description/index.html>`__ |
@ -0,0 +1,22 @@ |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################# |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
|||
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>) |
|||
# |
|||
# You can modify it under the terms of the GNU AFFERO |
|||
# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. |
|||
# |
|||
# This program is distributed in the hope that it will be useful, |
|||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. |
|||
# |
|||
# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE |
|||
# (AGPL v3) along with this program. |
|||
# If not, see <http://www.gnu.org/licenses/>. |
|||
# |
|||
############################################################################# |
|||
from . import models |
@ -0,0 +1,45 @@ |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################# |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
|||
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>) |
|||
# |
|||
# You can modify it under the terms of the GNU AFFERO |
|||
# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. |
|||
# |
|||
# This program is distributed in the hope that it will be useful, |
|||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. |
|||
# |
|||
# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE |
|||
# (AGPL v3) along with this program. |
|||
# If not, see <http://www.gnu.org/licenses/>. |
|||
# |
|||
############################################################################# |
|||
{ |
|||
'name': 'All In One Hide Print Button', |
|||
'version': '18.0.1.0.0', |
|||
'category': 'Sales, Purchases, Accounting, Warehouse, Manufacturing,' |
|||
'Project', |
|||
'summary': """ This module will help you to hide print button per user.""", |
|||
'description': """ This module crafted by Cybrosys Technologies provides |
|||
an option to hide print button per user.The administrator can choose which |
|||
print button should be hidden for the users.""", |
|||
'author': 'Cybrosys Techno Solutions', |
|||
'company': 'Cybrosys Techno Solutions', |
|||
'maintainer': 'Cybrosys Techno Solutions', |
|||
'website': "https://www.cybrosys.com", |
|||
'depends': ['base', 'sale_management', 'purchase', 'account', 'hr', |
|||
'project', 'stock', 'stock_picking_batch', 'mrp'], |
|||
'data': [ |
|||
'views/res_users_views.xml', |
|||
], |
|||
'images': ['static/description/banner.jpg'], |
|||
'license': 'AGPL-3', |
|||
'installable': True, |
|||
'auto_install': False, |
|||
'application': False, |
|||
} |
@ -0,0 +1,6 @@ |
|||
## Module <hide_all_print_button> |
|||
|
|||
#### 01.02.2024 |
|||
#### Version 18.0.1.0.0 |
|||
#### ADD |
|||
- Initial Commit for All In One Hide Print Button. |
@ -0,0 +1,34 @@ |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################# |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
|||
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>) |
|||
# |
|||
# You can modify it under the terms of the GNU AFFERO |
|||
# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. |
|||
# |
|||
# This program is distributed in the hope that it will be useful, |
|||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. |
|||
# |
|||
# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE |
|||
# (AGPL v3) along with this program. |
|||
# If not, see <http://www.gnu.org/licenses/>. |
|||
# |
|||
############################################################################# |
|||
from . import account_move |
|||
from . import hr_employee |
|||
from . import mrp_bom |
|||
from . import mrp_production |
|||
from . import project_task |
|||
from . import purchase_order |
|||
from . import res_users |
|||
from . import sale_order |
|||
from . import stock_location |
|||
from . import stock_lot |
|||
from . import stock_picking |
|||
from . import stock_picking_type |
|||
from . import stock_quant_package |
@ -0,0 +1,49 @@ |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################# |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
|||
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>) |
|||
# |
|||
# You can modify it under the terms of the GNU AFFERO |
|||
# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. |
|||
# |
|||
# This program is distributed in the hope that it will be useful, |
|||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. |
|||
# |
|||
# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE |
|||
# (AGPL v3) along with this program. |
|||
# If not, see <http://www.gnu.org/licenses/>. |
|||
# |
|||
############################################################################# |
|||
from odoo import api, models |
|||
|
|||
|
|||
class AccountMove(models.Model): |
|||
""" Class for inherited model account.move. |
|||
Methods: |
|||
get_views(self, views, options=None): |
|||
Function to make print button invisible according to the boolean |
|||
field in res.users. |
|||
""" |
|||
_inherit = 'account.move' |
|||
|
|||
@api.model |
|||
def get_views(self, views, options=None): |
|||
""" Function to make print button invisible according to the |
|||
boolean field in res.users. |
|||
views(list): List of views and ids |
|||
options(dict): Dictionary of action_id,load_filters,and toolbar |
|||
boolean:Returns true. |
|||
""" |
|||
res = super().get_views(views, options) |
|||
if self.env.user.hide_invoicing_print: |
|||
for view in ['form', 'list']: |
|||
if res['views'].get(view, {}) and res['views'].get( |
|||
view, {}).get('toolbar').get('print', []): |
|||
res['views'].get(view, {}).get('toolbar').get('print', |
|||
[]).clear() |
|||
return res |
@ -0,0 +1,50 @@ |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################# |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
|||
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>) |
|||
# |
|||
# You can modify it under the terms of the GNU AFFERO |
|||
# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. |
|||
# |
|||
# This program is distributed in the hope that it will be useful, |
|||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. |
|||
# |
|||
# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE |
|||
# (AGPL v3) along with this program. |
|||
# If not, see <http://www.gnu.org/licenses/>. |
|||
# |
|||
############################################################################# |
|||
from odoo import api, models |
|||
|
|||
|
|||
class HrEmployee(models.Model): |
|||
"""Class for inherited model hr.employee. |
|||
Methods: |
|||
get_views(self, views, options=None): |
|||
Function to make print button invisible according to the boolean |
|||
field in res.users. |
|||
""" |
|||
_inherit = 'hr.employee' |
|||
|
|||
@api.model |
|||
def get_views(self, views, options=None): |
|||
""" |
|||
Function to make print button invisible according to the |
|||
boolean field in res.users. |
|||
views(list): List of views and ids |
|||
options(dict): Dictionary of action_id,load_filters,and toolbar |
|||
boolean:Returns true. |
|||
""" |
|||
res = super().get_views(views, options) |
|||
if self.env.user.hide_hr_employee_print: |
|||
for view in ['form', 'list']: |
|||
if res['views'].get(view, {}) and res['views'].get( |
|||
view, {}).get('toolbar').get('print', []): |
|||
res['views'].get(view, {}).get('toolbar').get('print', |
|||
[]).clear() |
|||
return res |
@ -0,0 +1,49 @@ |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################# |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
|||
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>) |
|||
# |
|||
# You can modify it under the terms of the GNU AFFERO |
|||
# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. |
|||
# |
|||
# This program is distributed in the hope that it will be useful, |
|||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. |
|||
# |
|||
# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE |
|||
# (AGPL v3) along with this program. |
|||
# If not, see <http://www.gnu.org/licenses/>. |
|||
# |
|||
############################################################################# |
|||
from odoo import api, models |
|||
|
|||
|
|||
class MrpBom(models.Model): |
|||
"""Class for inherited model mrp.bom. |
|||
Methods: |
|||
get_views(self, views, options=None): |
|||
Function to make print button invisible according to the boolean |
|||
field in res.users. |
|||
""" |
|||
_inherit = 'mrp.bom' |
|||
|
|||
@api.model |
|||
def get_views(self, views, options=None): |
|||
""" Function to make print button invisible according to the |
|||
boolean field in res.users. |
|||
views(list): List of views and ids |
|||
options(dict): Dictionary of action_id,load_filters,and toolbar |
|||
boolean:returns true. |
|||
""" |
|||
res = super().get_views(views, options) |
|||
if self.env.user.hide_mrp_print and self.env.user.hide_mrp_bom_print: |
|||
for view in ['form', 'list']: |
|||
if res['views'].get(view, {}) and res['views'].get( |
|||
view, {}).get('toolbar').get('print', []): |
|||
res['views'].get(view, {}).get('toolbar').get('print', |
|||
[]).clear() |
|||
return res |
@ -0,0 +1,50 @@ |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################# |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
|||
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>) |
|||
# |
|||
# You can modify it under the terms of the GNU AFFERO |
|||
# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. |
|||
# |
|||
# This program is distributed in the hope that it will be useful, |
|||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. |
|||
# |
|||
# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE |
|||
# (AGPL v3) along with this program. |
|||
# If not, see <http://www.gnu.org/licenses/>. |
|||
# |
|||
############################################################################# |
|||
from odoo import api, models |
|||
|
|||
|
|||
class MrpProduction(models.Model): |
|||
"""Class for inherited model mrp.production. |
|||
Methods: |
|||
get_views(self, views, options=None): |
|||
Function to make print button invisible according to the boolean |
|||
field in res.users. |
|||
""" |
|||
_inherit = 'mrp.production' |
|||
|
|||
@api.model |
|||
def get_views(self, views, options=None): |
|||
""" Function to make print button invisible according to the |
|||
boolean field in res.users. |
|||
views(list): List of views and ids |
|||
options(dict): Dictionary of action_id,load_filters,and toolbar |
|||
boolean:Returns true. |
|||
""" |
|||
res = super().get_views(views, options) |
|||
if self.env.user.hide_mrp_print and \ |
|||
self.env.user.hide_mrp_production_print: |
|||
for view in ['form', 'list']: |
|||
if res['views'].get(view, {}) and res['views'].get( |
|||
view, {}).get('toolbar').get('print', []): |
|||
res['views'].get(view, {}).get('toolbar').get('print', |
|||
[]).clear() |
|||
return res |
@ -0,0 +1,49 @@ |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################# |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
|||
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>) |
|||
# |
|||
# You can modify it under the terms of the GNU AFFERO |
|||
# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. |
|||
# |
|||
# This program is distributed in the hope that it will be useful, |
|||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. |
|||
# |
|||
# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE |
|||
# (AGPL v3) along with this program. |
|||
# If not, see <http://www.gnu.org/licenses/>. |
|||
# |
|||
############################################################################# |
|||
from odoo import api, models |
|||
|
|||
|
|||
class ProjectTask(models.Model): |
|||
"""Class for inherited model project.task. |
|||
Methods: |
|||
get_views(self, views, options=None): |
|||
Function to make print button invisible according to the boolean |
|||
field in res.users. |
|||
""" |
|||
_inherit = 'project.task' |
|||
|
|||
@api.model |
|||
def get_views(self, views, options=None): |
|||
""" Function to make print button invisible according to the |
|||
boolean field in res.users. |
|||
views(list): List of views and ids |
|||
options(dict): Dictionary of action_id,load_filters,and toolbar |
|||
boolean:returns true. |
|||
""" |
|||
res = super().get_views(views, options) |
|||
if self.env.user.hide_project_task_print: |
|||
for view in ['form', 'list']: |
|||
if res['views'].get(view, {}) and res['views'].get( |
|||
view, {}).get('toolbar').get('print', []): |
|||
res['views'].get(view, {}).get('toolbar').get('print', |
|||
[]).clear() |
|||
return res |
@ -0,0 +1,49 @@ |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################# |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
|||
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>) |
|||
# |
|||
# You can modify it under the terms of the GNU AFFERO |
|||
# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. |
|||
# |
|||
# This program is distributed in the hope that it will be useful, |
|||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. |
|||
# |
|||
# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE |
|||
# (AGPL v3) along with this program. |
|||
# If not, see <http://www.gnu.org/licenses/>. |
|||
# |
|||
############################################################################# |
|||
from odoo import api, models |
|||
|
|||
|
|||
class PurchaseOrder(models.Model): |
|||
"""Class for inherited model purchase.order. |
|||
Methods: |
|||
get_views(self, views, options=None): |
|||
Function to make print button invisible according to the boolean |
|||
field in res.users. |
|||
""" |
|||
_inherit = 'purchase.order' |
|||
|
|||
@api.model |
|||
def get_views(self, views, options=None): |
|||
""" Function to make print button invisible according to the |
|||
boolean field in res.users. |
|||
views(list): List of views and ids |
|||
options(dict): Dictionary of action_id,load_filters,and toolbar |
|||
boolean:returns true. |
|||
""" |
|||
res = super().get_views(views, options) |
|||
if self.env.user.hide_purchase_print: |
|||
for view in ['form', 'list']: |
|||
if res['views'].get(view, {}) and res['views'].get( |
|||
view, {}).get('toolbar').get('print', []): |
|||
res['views'].get(view, {}).get('toolbar').get('print', |
|||
[]).clear() |
|||
return res |
@ -0,0 +1,77 @@ |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################# |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
|||
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>) |
|||
# |
|||
# You can modify it under the terms of the GNU AFFERO |
|||
# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. |
|||
# |
|||
# This program is distributed in the hope that it will be useful, |
|||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. |
|||
# |
|||
# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE |
|||
# (AGPL v3) along with this program. |
|||
# If not, see <http://www.gnu.org/licenses/>. |
|||
# |
|||
############################################################################# |
|||
from odoo import fields, models |
|||
|
|||
|
|||
class ResUsers(models.Model): |
|||
"""Class for inherited model res.users. Contains fields that are needed |
|||
for hiding print buttons on different models. |
|||
""" |
|||
_inherit = 'res.users' |
|||
|
|||
hide_sale_print = fields.Boolean( |
|||
string='Button in Sales', |
|||
help='Enable to hide print button in sales for this user.') |
|||
hide_invoicing_print = fields.Boolean( |
|||
string='Button in Invoicing', |
|||
help='Enable to hide print button in ' |
|||
'Invoicing(Invoices and Bills) for this user.') |
|||
hide_purchase_print = fields.Boolean( |
|||
string='Button in Purchase', |
|||
help='Enable to hide print button in Purchase for this user.') |
|||
hide_project_task_print = fields.Boolean( |
|||
string='Button in Project Task', |
|||
help='Enable to hide print button in Project Task for this user.') |
|||
hide_hr_employee_print = fields.Boolean( |
|||
string='Button in Employee', |
|||
help='Enable to hide print button in Employee for this user.') |
|||
hide_inventory_print = fields.Boolean( |
|||
string='Button in Inventory', |
|||
help='Enable to hide print button in Inventory(Stock) for this user.') |
|||
hide_stock_picking_print = fields.Boolean( |
|||
string='Button in Transfers', |
|||
help='Enable to hide print button in ' |
|||
'Transfers (Stock Picking) for this user.') |
|||
hide_stock_lot_print = fields.Boolean( |
|||
string='Button in Lots/Serial Number', |
|||
help='Enable to hide print button in Lots/Serial Number for ' |
|||
'this user.') |
|||
hide_stock_quant_package_print = fields.Boolean( |
|||
string='Button in Packages', |
|||
help='Enable to hide print button in Packages(Stock) for this user.') |
|||
hide_stock_location_print = fields.Boolean( |
|||
string='Button in Stock Locations', |
|||
help='Enable to hide print button in Stock Locations for this user.') |
|||
hide_stock_picking_type_print = fields.Boolean( |
|||
string='Button in Operations Types', |
|||
help='Enable to hide print button in Operations Types for this user.') |
|||
hide_mrp_print = fields.Boolean( |
|||
string='Button in Manufacturing', |
|||
help='Enable to hide print button in Manufacturing for this user.') |
|||
hide_mrp_production_print = fields.Boolean( |
|||
string='Button in Manufacturing Orders', |
|||
help='Enable to hide print button in Manufacturing Orders for ' |
|||
'this user.') |
|||
hide_mrp_bom_print = fields.Boolean( |
|||
string='Button in Bill of Materials', |
|||
help='Enable to hide print button in Bill of Materials for ' |
|||
'this user.') |
@ -0,0 +1,49 @@ |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################# |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
|||
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>) |
|||
# |
|||
# You can modify it under the terms of the GNU AFFERO |
|||
# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. |
|||
# |
|||
# This program is distributed in the hope that it will be useful, |
|||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. |
|||
# |
|||
# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE |
|||
# (AGPL v3) along with this program. |
|||
# If not, see <http://www.gnu.org/licenses/>. |
|||
# |
|||
############################################################################# |
|||
from odoo import api, models |
|||
|
|||
|
|||
class SaleOrder(models.Model): |
|||
""" Class for inherited model sale.order. |
|||
Methods: |
|||
get_views(self, views, options=None): |
|||
Function to make print button invisible according to the boolean |
|||
field in res.users. |
|||
""" |
|||
_inherit = 'sale.order' |
|||
|
|||
@api.model |
|||
def get_views(self, views, options=None): |
|||
""" Function to make print button invisible according to the |
|||
boolean field in res.users. |
|||
views(list): List of views and ids |
|||
options(dict): Dictionary of action_id,load_filters,and toolbar |
|||
boolean:returns true. |
|||
""" |
|||
res = super().get_views(views, options) |
|||
if self.env.user.hide_sale_print: |
|||
for view in ['form', 'list']: |
|||
if res['views'].get(view, {}) and res['views'].get( |
|||
view, {}).get('toolbar').get('print', []): |
|||
res['views'].get(view, {}).get('toolbar').get('print', |
|||
[]).clear() |
|||
return res |
@ -0,0 +1,50 @@ |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################# |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
|||
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>) |
|||
# |
|||
# You can modify it under the terms of the GNU AFFERO |
|||
# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. |
|||
# |
|||
# This program is distributed in the hope that it will be useful, |
|||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. |
|||
# |
|||
# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE |
|||
# (AGPL v3) along with this program. |
|||
# If not, see <http://www.gnu.org/licenses/>. |
|||
# |
|||
############################################################################# |
|||
from odoo import api, models |
|||
|
|||
|
|||
class StockLocation(models.Model): |
|||
""" Class for inherited model stock.location. |
|||
Methods: |
|||
get_views(self, views, options=None): |
|||
Function to make print button invisible according to the boolean |
|||
field in res.users. |
|||
""" |
|||
_inherit = 'stock.location' |
|||
|
|||
@api.model |
|||
def get_views(self, views, options=None): |
|||
""" Function to make print button invisible according to the |
|||
boolean field in res.users. |
|||
views(list): List of views and ids |
|||
options(dict): Dictionary of action_id,load_filters,and toolbar |
|||
boolean:returns true. |
|||
""" |
|||
res = super().get_views(views, options) |
|||
if self.env.user.hide_inventory_print and \ |
|||
self.env.user.hide_stock_location_print: |
|||
for view in ['form', 'list']: |
|||
if res['views'].get(view, {}) and res['views'].get( |
|||
view, {}).get('toolbar').get('print', []): |
|||
res['views'].get(view, {}).get('toolbar').get('print', |
|||
[]).clear() |
|||
return res |
@ -0,0 +1,50 @@ |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################# |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
|||
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>) |
|||
# |
|||
# You can modify it under the terms of the GNU AFFERO |
|||
# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. |
|||
# |
|||
# This program is distributed in the hope that it will be useful, |
|||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. |
|||
# |
|||
# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE |
|||
# (AGPL v3) along with this program. |
|||
# If not, see <http://www.gnu.org/licenses/>. |
|||
# |
|||
############################################################################# |
|||
from odoo import api, models |
|||
|
|||
|
|||
class StockLot(models.Model): |
|||
"""Class for inherited model stock.lot. |
|||
Methods: |
|||
get_views(self, views, options=None): |
|||
Function to make print button invisible according to the boolean |
|||
field in res.users. |
|||
""" |
|||
_inherit = 'stock.lot' |
|||
|
|||
@api.model |
|||
def get_views(self, views, options=None): |
|||
""" Function to make print button invisible according to the |
|||
boolean field in res.users. |
|||
views(list): List of views and ids |
|||
options(dict): Dictionary of action_id,load_filters,and toolbar |
|||
boolean:returns true. |
|||
""" |
|||
res = super().get_views(views, options) |
|||
if self.env.user.hide_inventory_print and \ |
|||
self.env.user.hide_stock_lot_print: |
|||
for view in ['form', 'list']: |
|||
if res['views'].get(view, {}) and res['views'].get( |
|||
view, {}).get('toolbar').get('print', []): |
|||
res['views'].get(view, {}).get('toolbar').get('print', |
|||
[]).clear() |
|||
return res |
@ -0,0 +1,50 @@ |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################# |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
|||
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>) |
|||
# |
|||
# You can modify it under the terms of the GNU AFFERO |
|||
# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. |
|||
# |
|||
# This program is distributed in the hope that it will be useful, |
|||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. |
|||
# |
|||
# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE |
|||
# (AGPL v3) along with this program. |
|||
# If not, see <http://www.gnu.org/licenses/>. |
|||
# |
|||
############################################################################# |
|||
from odoo import api, models |
|||
|
|||
|
|||
class StockPicking(models.Model): |
|||
"""Class for inherited model stock.picking. |
|||
Methods: |
|||
get_views(self, views, options=None): |
|||
Function to make print button invisible according to the boolean |
|||
field in res.users. |
|||
""" |
|||
_inherit = 'stock.picking' |
|||
|
|||
@api.model |
|||
def get_views(self, views, options=None): |
|||
""" Function to make print button invisible according to the |
|||
boolean field in res.users. |
|||
views(list): List of views and ids |
|||
options(dict): Dictionary of action_id,load_filters,and toolbar |
|||
boolean:returns true. |
|||
""" |
|||
res = super().get_views(views, options) |
|||
if self.env.user.hide_inventory_print and \ |
|||
self.env.user.hide_stock_picking_print: |
|||
for view in ['form', 'list']: |
|||
if res['views'].get(view, {}) and res['views'].get( |
|||
view, {}).get('toolbar').get('print', []): |
|||
res['views'].get(view, {}).get('toolbar').get('print', |
|||
[]).clear() |
|||
return res |
@ -0,0 +1,50 @@ |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################# |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
|||
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>) |
|||
# |
|||
# You can modify it under the terms of the GNU AFFERO |
|||
# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. |
|||
# |
|||
# This program is distributed in the hope that it will be useful, |
|||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. |
|||
# |
|||
# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE |
|||
# (AGPL v3) along with this program. |
|||
# If not, see <http://www.gnu.org/licenses/>. |
|||
# |
|||
############################################################################# |
|||
from odoo import api, models |
|||
|
|||
|
|||
class StockPickingType(models.Model): |
|||
"""Class for inherited model stock.picking.type. |
|||
Methods: |
|||
get_views(self, views, options=None): |
|||
Function to make print button invisible according to the boolean |
|||
field in res.users. |
|||
""" |
|||
_inherit = 'stock.picking.type' |
|||
|
|||
@api.model |
|||
def get_views(self, views, options=None): |
|||
""" Function to make print button invisible according to the |
|||
boolean field in res.users. |
|||
views(list): List of views and ids |
|||
options(dict): Dictionary of action_id,load_filters,and toolbar |
|||
boolean:returns true. |
|||
""" |
|||
res = super().get_views(views, options) |
|||
if self.env.user.hide_inventory_print and \ |
|||
self.env.user.hide_stock_picking_type_print: |
|||
for view in ['form', 'list']: |
|||
if res['views'].get(view, {}) and res['views'].get( |
|||
view, {}).get('toolbar').get('print', []): |
|||
res['views'].get(view, {}).get('toolbar').get('print', |
|||
[]).clear() |
|||
return res |
@ -0,0 +1,50 @@ |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################# |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
|||
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>) |
|||
# |
|||
# You can modify it under the terms of the GNU AFFERO |
|||
# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. |
|||
# |
|||
# This program is distributed in the hope that it will be useful, |
|||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. |
|||
# |
|||
# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE |
|||
# (AGPL v3) along with this program. |
|||
# If not, see <http://www.gnu.org/licenses/>. |
|||
# |
|||
############################################################################# |
|||
from odoo import api, models |
|||
|
|||
|
|||
class StockQuantPackage(models.Model): |
|||
"""Class for inherited model stock.quant.package. |
|||
Methods: |
|||
get_views(self, views, options=None): |
|||
Function to make print button invisible according to the boolean |
|||
field in res.users. |
|||
""" |
|||
_inherit = 'stock.quant.package' |
|||
|
|||
@api.model |
|||
def get_views(self, views, options=None): |
|||
""" Function to make print button invisible according to |
|||
the boolean field in res.users. |
|||
views(list): List of views and ids |
|||
options(dict): Dictionary of action_id,load_filters,and toolbar |
|||
boolean:returns true. |
|||
""" |
|||
res = super().get_views(views, options) |
|||
if self.env.user.hide_inventory_print and \ |
|||
self.env.user.hide_stock_quant_package_print: |
|||
for view in ['form', 'list']: |
|||
if res['views'].get(view, {}) and res['views'].get( |
|||
view, {}).get('toolbar').get('print', []): |
|||
res['views'].get(view, {}).get('toolbar').get('print', |
|||
[]).clear() |
|||
return res |
After Width: | Height: | Size: 2.2 KiB |
After Width: | Height: | Size: 28 KiB |
After Width: | Height: | Size: 628 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 210 KiB |
After Width: | Height: | Size: 209 KiB |
After Width: | Height: | Size: 109 KiB |
After Width: | Height: | Size: 495 B |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 624 B |
After Width: | Height: | Size: 136 KiB |
After Width: | Height: | Size: 214 KiB |
After Width: | Height: | Size: 36 KiB |
After Width: | Height: | Size: 3.6 KiB |
After Width: | Height: | Size: 310 B |
After Width: | Height: | Size: 929 B |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 3.3 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 17 KiB |
After Width: | Height: | Size: 542 B |
After Width: | Height: | Size: 576 B |
After Width: | Height: | Size: 733 B |
After Width: | Height: | Size: 4.3 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 4.0 KiB |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 2.2 KiB |
After Width: | Height: | Size: 911 B |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 600 B |
After Width: | Height: | Size: 673 B |
After Width: | Height: | Size: 2.0 KiB |
After Width: | Height: | Size: 462 B |
After Width: | Height: | Size: 2.1 KiB |
After Width: | Height: | Size: 926 B |
After Width: | Height: | Size: 9.0 KiB |
After Width: | Height: | Size: 23 KiB |
After Width: | Height: | Size: 7.0 KiB |
After Width: | Height: | Size: 878 B |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 653 B |
After Width: | Height: | Size: 800 B |
After Width: | Height: | Size: 905 B |
After Width: | Height: | Size: 189 KiB |
After Width: | Height: | Size: 4.3 KiB |
After Width: | Height: | Size: 839 B |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 5.9 KiB |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 34 KiB |
After Width: | Height: | Size: 26 KiB |
After Width: | Height: | Size: 3.8 KiB |
After Width: | Height: | Size: 23 KiB |
After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 2.3 KiB |
After Width: | Height: | Size: 427 B |
After Width: | Height: | Size: 627 B |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 988 B |
After Width: | Height: | Size: 3.7 KiB |
After Width: | Height: | Size: 5.0 KiB |
After Width: | Height: | Size: 875 B |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 767 KiB |
After Width: | Height: | Size: 138 KiB |
After Width: | Height: | Size: 760 KiB |
After Width: | Height: | Size: 92 KiB |
After Width: | Height: | Size: 697 KiB |
After Width: | Height: | Size: 1.1 MiB |
After Width: | Height: | Size: 102 KiB |
After Width: | Height: | Size: 115 KiB |
After Width: | Height: | Size: 168 KiB |
After Width: | Height: | Size: 130 KiB |
After Width: | Height: | Size: 161 KiB |
After Width: | Height: | Size: 161 KiB |
After Width: | Height: | Size: 133 KiB |
After Width: | Height: | Size: 279 KiB |