add modules
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
from . import models
|
||||
|
|
@ -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"],
|
||||
}
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
from . import res_users
|
||||
|
|
@ -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)
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
<?xml version="1.0" ?>
|
||||
<odoo>
|
||||
<data>
|
||||
<record id="pw_group_journal_restriction" model="res.groups">
|
||||
<field name="name">Restrict Journals</field>
|
||||
</record>
|
||||
|
||||
<record id="pw_rule_user_journal_restrict" model="ir.rule">
|
||||
<field name="name">User Restrict Journals</field>
|
||||
<field name="model_id" ref="account.model_account_journal"/>
|
||||
<field name="domain_force">[('id', 'in', user.journal_ids.ids)]</field>
|
||||
<field name="groups" eval="[(4, ref('pw_restrict_account_journal.pw_group_journal_restriction'))]"/>
|
||||
</record>
|
||||
</data>
|
||||
</odoo>
|
||||
|
After Width: | Height: | Size: 118 KiB |
|
After Width: | Height: | Size: 175 KiB |
|
After Width: | Height: | Size: 101 KiB |
|
After Width: | Height: | Size: 157 KiB |
|
After Width: | Height: | Size: 182 KiB |
|
After Width: | Height: | Size: 164 KiB |
|
After Width: | Height: | Size: 83 KiB |
|
After Width: | Height: | Size: 131 KiB |
|
After Width: | Height: | Size: 194 KiB |
|
After Width: | Height: | Size: 141 KiB |
|
After Width: | Height: | Size: 15 KiB |
|
|
@ -0,0 +1,61 @@
|
|||
<section class="oe_container oe_dark" style="overflow: hidden;
|
||||
background: #cddae8;
|
||||
border-radius: 15px;">
|
||||
<div class="mt32 mb32">
|
||||
<div class="col-md-12">
|
||||
<h2 class="oe_slogan" style="font-family: Quicksand; font-size: 35px;"><b>Journal Restriction on Users</b></h2>
|
||||
<h3 class="oe_slogn" style="font-family: Quicksand; text-align: center;">This module is allow you to restrict account journal for the specific users to access allowed journals only
|
||||
</h3>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<br/><br/>
|
||||
|
||||
<section class="oe_container">
|
||||
<div class="alert" style="color: black;background-color: #cddae8;border-color: black;">
|
||||
<i class="fa fa-hand-o-right"></i><b> App Features</b>
|
||||
</div>
|
||||
<ul class="list-unstyled mr32 ml32">
|
||||
<li><i class="fa fa-check" style="color: #cddae8;"></i> Restrict acccount journals for the users</li>
|
||||
<li><i class="fa fa-check" style="color: #cddae8;"></i> User can access allowed journals only</li>
|
||||
<li><i class="fa fa-check" style="color: #cddae8;"></i> Compatible with community and enterprise</li>
|
||||
</ul>
|
||||
<div class="alert text-center mt32" style="background-color: #cddae8;border-color: black;">
|
||||
<b>Journal Restriction on Users</b>
|
||||
</div>
|
||||
<br/>Group for Restrict Journals to the user<br/>
|
||||
<img class="img-border img-responsive thumbnail mt32" src="account_1.png" style="width: 100%;"><br/>
|
||||
<br/>You can see user can access all the journals by default<br/>
|
||||
<img class="img-border img-responsive thumbnail mt32" src="account_2.png" style="width: 100%;"><br/>
|
||||
<br/>User can see all the journals by default in accounting dashboard<br/>
|
||||
<img class="img-border img-responsive thumbnail mt32" src="account_3.png" style="width: 100%;"><br/>
|
||||
<br/>Now you can assign group to the specific user to Allow Journals, You can see the new tab Allowed Journals.<br/>
|
||||
<img class="img-border img-responsive thumbnail mt32" src="account_4.png" style="width: 100%;"><br/>
|
||||
<br/>You can allow multiple journals to the specific user, user can only access to his allowed journals<br/>
|
||||
<img class="img-border img-responsive thumbnail mt32" src="account_5.png" style="width: 100%;"><br/>
|
||||
<br/>You can see user can access only allowed journals<br/>
|
||||
<img class="img-border img-responsive thumbnail mt32" src="account_6.png" style="width: 100%;"><br/>
|
||||
<br/>Also user can see the allowed journals in accounting dashboard<br/>
|
||||
<img class="img-border img-responsive thumbnail mt32" src="account_7.png" style="width: 100%;"><br/>
|
||||
<br/>User can only access to his allowed journals in registering payment from customer invoice/vendor bills/journal entries etc..<br/>
|
||||
<img class="img-border img-responsive thumbnail mt32" src="account_8.png" style="width: 100%;"><br/>
|
||||
<br/>User can only access to his allowed journals in creating customer/vendor payment<br/>
|
||||
<img class="img-border img-responsive thumbnail mt32" src="account_9.png" style="width: 100%;"><br/>
|
||||
</section>
|
||||
|
||||
<section class="oe_container" style="overflow: hidden;">
|
||||
<div class="mt32 mb32">
|
||||
<div class="col-md-12" style="text-align: center;">
|
||||
<img src="pw_logo.png" style="width: 300px;" /><br>
|
||||
</div><br>
|
||||
<div class="oe_slogan text-center">
|
||||
<h2 class="oe_slogan">
|
||||
Contact US
|
||||
</h2>
|
||||
<p class="btn btn-success mt8" style="background-color: #2355a6; color: #FFFFFF !important;font-size:20px;"> Email : prewayit@gmail.com </p>
|
||||
</div>
|
||||
<div style="text-align: center;">
|
||||
<p>Note: We give free support incase any bug or issue in our apps (Except data recovery).</p>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
After Width: | Height: | Size: 45 KiB |
|
|
@ -0,0 +1,22 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<data>
|
||||
<record id="view_users_form_inherit_restrict_journals" model="ir.ui.view">
|
||||
<field name="name">res.users.form.inherit.restrict.journals</field>
|
||||
<field name="model">res.users</field>
|
||||
<field name="inherit_id" ref="base.view_users_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="partner_id" position="after">
|
||||
<field name="show_journal" invisible="1"/>
|
||||
</field>
|
||||
<xpath expr="//notebook" position="inside">
|
||||
<page string="Allowed Journals" attrs="{'invisible': [('show_journal', '=', False)]}">
|
||||
<group>
|
||||
<field string="Allowed Journals" name="journal_ids" widget="many2many_tags" options="{'no_create': True}"/>
|
||||
</group>
|
||||
</page>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
</data>
|
||||
</odoo>
|
||||