diff --git a/odex25_accounting/hr_expense_petty_cash/models/account_move.py b/odex25_accounting/hr_expense_petty_cash/models/account_move.py index 6052df7d4..d4692abd0 100644 --- a/odex25_accounting/hr_expense_petty_cash/models/account_move.py +++ b/odex25_accounting/hr_expense_petty_cash/models/account_move.py @@ -159,9 +159,8 @@ class AccountMove(models.Model): return inv_line def action_register_payment(self): - for rec in self: - res = super(AccountMove, rec).action_register_payment() - res['context']['default_petty_cash_id'] = rec.petty_cash_id.id + res = super(AccountMove, self).action_register_payment() + res['context']['default_petty_cash_id'] = self.petty_cash_id.id return res # todo start @api.model diff --git a/odex25_accounting/odex25_account_auto_transfer/i18n/ar.po b/odex25_accounting/odex25_account_auto_transfer/i18n/ar.po index 773b35a07..8aafb8cfc 100644 --- a/odex25_accounting/odex25_account_auto_transfer/i18n/ar.po +++ b/odex25_accounting/odex25_account_auto_transfer/i18n/ar.po @@ -396,7 +396,7 @@ msgstr "" #. module: odex25_account_auto_transfer #: model_terms:ir.ui.view,arch_db:odex25_account_auto_transfer.view_transfer_model_form msgid "Transfers" -msgstr "الشحنات" +msgstr "التحويلات" #. module: odex25_account_auto_transfer #: model:ir.model.fields.selection,name:odex25_account_auto_transfer.selection__account_transfer_model__frequency__year diff --git a/odex25_accounting/pw_restrict_account_journal/LICENSE b/odex25_accounting/pw_restrict_account_journal/LICENSE new file mode 100755 index 000000000..b01eaf1b7 --- /dev/null +++ b/odex25_accounting/pw_restrict_account_journal/LICENSE @@ -0,0 +1,27 @@ +Odoo Proprietary License v1.0 + +This software and associated files (the "Software") may only be used (executed, +modified, executed after modifications) if you have purchased a valid license +from the authors, typically via Odoo Apps, or if you have received a written +agreement from the authors of the Software (see the COPYRIGHT file). + +You may develop Odoo modules that use the Software as a library (typically +by depending on it, importing it and using its resources), but without copying +any source code or material from the Software. You may distribute those +modules under the license of your choice, provided that this license is +compatible with the terms of the Odoo Proprietary License (For example: +LGPL, MIT, or proprietary licenses similar to this one). + +It is forbidden to publish, distribute, sublicense, or sell copies of the Software +or modified copies of the Software. + +The above copyright notice and this permission notice must be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. diff --git a/odex25_accounting/pw_restrict_account_journal/__init__.py b/odex25_accounting/pw_restrict_account_journal/__init__.py new file mode 100755 index 000000000..a0fdc10fe --- /dev/null +++ b/odex25_accounting/pw_restrict_account_journal/__init__.py @@ -0,0 +1,2 @@ +# -*- coding: utf-8 -*- +from . import models diff --git a/odex25_accounting/pw_restrict_account_journal/__manifest__.py b/odex25_accounting/pw_restrict_account_journal/__manifest__.py new file mode 100755 index 000000000..7f55ebe23 --- /dev/null +++ b/odex25_accounting/pw_restrict_account_journal/__manifest__.py @@ -0,0 +1,24 @@ +# -*- coding: utf-8 -*- +{ + "name": "Journal Restriction on Users", + "version": "1.0", + 'summary': """ + This module is allow you to restrict account journal to the specific users to access allowed journals only | Journal Restriction for users | Journal restricted users | Journal restriction by user | User journal restriction""", + 'description': """ +This module is allow you to restrict account journal to the specific users to access allowed journals only + """, + "category": "Accounting", + 'author': "Preway IT Solutions", + "sequence": 2, + "depends" : ['account'], + "data" : [ + 'security/account_security.xml', + 'views/res_user_view.xml', + ], + 'price': 10.0, + 'currency': 'EUR', + "installable": True, + "auto_install": False, + 'live_test_url': 'https://youtu.be/xmJqnPFyy30', + "images":["static/description/Banner.png"], +} diff --git a/odex25_accounting/pw_restrict_account_journal/models/__init__.py b/odex25_accounting/pw_restrict_account_journal/models/__init__.py new file mode 100755 index 000000000..741ed460c --- /dev/null +++ b/odex25_accounting/pw_restrict_account_journal/models/__init__.py @@ -0,0 +1,2 @@ +# -*- coding: utf-8 -*- +from . import res_users diff --git a/odex25_accounting/pw_restrict_account_journal/models/res_users.py b/odex25_accounting/pw_restrict_account_journal/models/res_users.py new file mode 100755 index 000000000..c6deaa9f2 --- /dev/null +++ b/odex25_accounting/pw_restrict_account_journal/models/res_users.py @@ -0,0 +1,21 @@ +# -*- coding: utf-8 -*- +from odoo import api, fields, models + + +class ResUsers(models.Model): + _inherit = "res.users" + + journal_ids = fields.Many2many('account.journal') + show_journal = fields.Boolean(compute='_compute_show_journal') + + def _compute_show_journal(self): + for user in self: + if user.has_group('pw_restrict_account_journal.pw_group_journal_restriction'): + user.show_journal = True + else: + user.show_journal = False + + def write(self, vals): + if 'journal_ids' in vals: + self.env['ir.rule'].clear_caches() + return super(ResUsers, self).write(vals) diff --git a/odex25_accounting/pw_restrict_account_journal/security/account_security.xml b/odex25_accounting/pw_restrict_account_journal/security/account_security.xml new file mode 100755 index 000000000..0c6c2aea8 --- /dev/null +++ b/odex25_accounting/pw_restrict_account_journal/security/account_security.xml @@ -0,0 +1,15 @@ + + + + + Restrict Journals + + + + User Restrict Journals + + [('id', 'in', user.journal_ids.ids)] + + + + diff --git a/odex25_accounting/pw_restrict_account_journal/static/description/Banner.png b/odex25_accounting/pw_restrict_account_journal/static/description/Banner.png new file mode 100755 index 000000000..01254e357 Binary files /dev/null and b/odex25_accounting/pw_restrict_account_journal/static/description/Banner.png differ diff --git a/odex25_accounting/pw_restrict_account_journal/static/description/account_1.png b/odex25_accounting/pw_restrict_account_journal/static/description/account_1.png new file mode 100755 index 000000000..38219f19b Binary files /dev/null and b/odex25_accounting/pw_restrict_account_journal/static/description/account_1.png differ diff --git a/odex25_accounting/pw_restrict_account_journal/static/description/account_2.png b/odex25_accounting/pw_restrict_account_journal/static/description/account_2.png new file mode 100755 index 000000000..75b4898ff Binary files /dev/null and b/odex25_accounting/pw_restrict_account_journal/static/description/account_2.png differ diff --git a/odex25_accounting/pw_restrict_account_journal/static/description/account_3.png b/odex25_accounting/pw_restrict_account_journal/static/description/account_3.png new file mode 100755 index 000000000..43e0d59a7 Binary files /dev/null and b/odex25_accounting/pw_restrict_account_journal/static/description/account_3.png differ diff --git a/odex25_accounting/pw_restrict_account_journal/static/description/account_4.png b/odex25_accounting/pw_restrict_account_journal/static/description/account_4.png new file mode 100755 index 000000000..96caa71c6 Binary files /dev/null and b/odex25_accounting/pw_restrict_account_journal/static/description/account_4.png differ diff --git a/odex25_accounting/pw_restrict_account_journal/static/description/account_5.png b/odex25_accounting/pw_restrict_account_journal/static/description/account_5.png new file mode 100755 index 000000000..73667092e Binary files /dev/null and b/odex25_accounting/pw_restrict_account_journal/static/description/account_5.png differ diff --git a/odex25_accounting/pw_restrict_account_journal/static/description/account_6.png b/odex25_accounting/pw_restrict_account_journal/static/description/account_6.png new file mode 100755 index 000000000..20f32c4ba Binary files /dev/null and b/odex25_accounting/pw_restrict_account_journal/static/description/account_6.png differ diff --git a/odex25_accounting/pw_restrict_account_journal/static/description/account_7.png b/odex25_accounting/pw_restrict_account_journal/static/description/account_7.png new file mode 100755 index 000000000..b614ed7f7 Binary files /dev/null and b/odex25_accounting/pw_restrict_account_journal/static/description/account_7.png differ diff --git a/odex25_accounting/pw_restrict_account_journal/static/description/account_8.png b/odex25_accounting/pw_restrict_account_journal/static/description/account_8.png new file mode 100755 index 000000000..2b4743adb Binary files /dev/null and b/odex25_accounting/pw_restrict_account_journal/static/description/account_8.png differ diff --git a/odex25_accounting/pw_restrict_account_journal/static/description/account_9.png b/odex25_accounting/pw_restrict_account_journal/static/description/account_9.png new file mode 100755 index 000000000..7145e09e4 Binary files /dev/null and b/odex25_accounting/pw_restrict_account_journal/static/description/account_9.png differ diff --git a/odex25_accounting/pw_restrict_account_journal/static/description/icon.png b/odex25_accounting/pw_restrict_account_journal/static/description/icon.png new file mode 100755 index 000000000..39475f532 Binary files /dev/null and b/odex25_accounting/pw_restrict_account_journal/static/description/icon.png differ diff --git a/odex25_accounting/pw_restrict_account_journal/static/description/index.html b/odex25_accounting/pw_restrict_account_journal/static/description/index.html new file mode 100755 index 000000000..521250b6a --- /dev/null +++ b/odex25_accounting/pw_restrict_account_journal/static/description/index.html @@ -0,0 +1,61 @@ +
+
+
+

Journal Restriction on Users

+

This module is allow you to restrict account journal for the specific users to access allowed journals only +

+
+
+
+

+ +
+
+ App Features +
+ +
+ Journal Restriction on Users +
+
Group for Restrict Journals to the user
+
+
You can see user can access all the journals by default
+
+
User can see all the journals by default in accounting dashboard
+
+
Now you can assign group to the specific user to Allow Journals, You can see the new tab Allowed Journals.
+
+
You can allow multiple journals to the specific user, user can only access to his allowed journals
+
+
You can see user can access only allowed journals
+
+
Also user can see the allowed journals in accounting dashboard
+
+
User can only access to his allowed journals in registering payment from customer invoice/vendor bills/journal entries etc..
+
+
User can only access to his allowed journals in creating customer/vendor payment
+
+
+ +
+
+
+
+

+
+

+ Contact US +

+

Email : prewayit@gmail.com

+
+
+

Note: We give free support incase any bug or issue in our apps (Except data recovery).

+
+
+
diff --git a/odex25_accounting/pw_restrict_account_journal/static/description/pw_logo.png b/odex25_accounting/pw_restrict_account_journal/static/description/pw_logo.png new file mode 100755 index 000000000..3809ff555 Binary files /dev/null and b/odex25_accounting/pw_restrict_account_journal/static/description/pw_logo.png differ diff --git a/odex25_accounting/pw_restrict_account_journal/views/res_user_view.xml b/odex25_accounting/pw_restrict_account_journal/views/res_user_view.xml new file mode 100755 index 000000000..ba98f18c9 --- /dev/null +++ b/odex25_accounting/pw_restrict_account_journal/views/res_user_view.xml @@ -0,0 +1,22 @@ + + + + + res.users.form.inherit.restrict.journals + res.users + + + + + + + + + + + + + + + +