@ -0,0 +1,25 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
############################################################################# |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# |
||||
|
# Copyright (C) 2022-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 LESSER |
||||
|
# GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. |
||||
|
# |
||||
|
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE |
||||
|
# (LGPL v3) along with this program. |
||||
|
# If not, see <http://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
############################################################################# |
||||
|
|
||||
|
from . import models |
||||
|
from . import wizard |
||||
|
from . import report |
@ -0,0 +1,59 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
############################################################################# |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# |
||||
|
# Copyright (C) 2022-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 LESSER |
||||
|
# GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. |
||||
|
# |
||||
|
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE |
||||
|
# (LGPL v3) along with this program. |
||||
|
# If not, see <http://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
############################################################################# |
||||
|
|
||||
|
{ |
||||
|
'name': "Multi Branch Operations", |
||||
|
'version': "14.0.1.0.0", |
||||
|
'summary': """ Multiple Branch Unit Operation Setup for All |
||||
|
Modules In Odoo""", |
||||
|
'description': """Multiple Branch Unit Operation Setup for All |
||||
|
Modules In Odoo, Branch, Branch Operations, Multiple Branch, Branch Setup""", |
||||
|
'author': "Cybrosys Techno Solutions", |
||||
|
'company': "Cybrosys Techno Solutions", |
||||
|
'maintainer': "Cybrosys Techno Solutions", |
||||
|
'website': "https://www.cybrosys.com", |
||||
|
'category': 'Tools', |
||||
|
'depends': ['sale_management', |
||||
|
'sale_stock', 'purchase_stock', |
||||
|
'stock_account'], |
||||
|
'data': [ |
||||
|
'security/branch_security.xml', |
||||
|
'security/ir.model.access.csv', |
||||
|
'views/res_branch_views.xml', |
||||
|
'views/branch_product_template_views.xml', |
||||
|
'views/branch_res_partner_views.xml', |
||||
|
'views/branch_sale_order_views.xml', |
||||
|
'views/branch_purchase_order_views.xml', |
||||
|
'views/branch_res_users_views.xml', |
||||
|
'views/branch_stock_picking_views.xml', |
||||
|
'views/branch_account_move_views.xml', |
||||
|
'views/branch_account_payment_views.xml', |
||||
|
'views/branch_account_journal.xml', |
||||
|
'views/branch_account_views.xml', |
||||
|
'views/branch_stock_warehouse_views.xml', |
||||
|
'views/branch_report_template.xml', |
||||
|
], |
||||
|
'images': ['static/description/banner.jpg'], |
||||
|
'license': "AGPL-3", |
||||
|
'installable': True, |
||||
|
'application': False |
||||
|
} |
@ -0,0 +1,8 @@ |
|||||
|
## Module <multi_branch_base> |
||||
|
|
||||
|
#### 16.01.2022 |
||||
|
#### Version 14.0.1.0.0 |
||||
|
##### ADD |
||||
|
- Initial commit |
||||
|
|
||||
|
|
@ -0,0 +1,34 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
############################################################################# |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# |
||||
|
# Copyright (C) 2022-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 LESSER |
||||
|
# GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. |
||||
|
# |
||||
|
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE |
||||
|
# (LGPL v3) along with this program. |
||||
|
# If not, see <http://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
############################################################################# |
||||
|
|
||||
|
from . import res_branch |
||||
|
from . import branch_res_partner |
||||
|
from . import branch_res_users |
||||
|
from . import branch_stock_picking |
||||
|
from . import branch_product_template |
||||
|
from . import branch_sale_order |
||||
|
from . import branch_purchase_order |
||||
|
from . import branch_account_move |
||||
|
from . import branch_account_payment |
||||
|
from . import branch_account_journal |
||||
|
from . import branch_account_account |
||||
|
from . import branch_stock_warehouse |
@ -0,0 +1,41 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
############################################################################# |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# |
||||
|
# Copyright (C) 2022-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 LESSER |
||||
|
# GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. |
||||
|
# |
||||
|
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE |
||||
|
# (LGPL v3) along with this program. |
||||
|
# If not, see <http://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
############################################################################# |
||||
|
|
||||
|
from odoo import models, fields |
||||
|
|
||||
|
|
||||
|
class AccountAccount(models.Model): |
||||
|
"""inherited account account""" |
||||
|
_inherit = "account.account" |
||||
|
|
||||
|
def _get_branch_domain(self): |
||||
|
"""methode to get branch domain""" |
||||
|
company = self.env.company |
||||
|
branch_ids = self.env.user.branch_ids |
||||
|
branch = branch_ids.filtered( |
||||
|
lambda branch: branch.company_id == company) |
||||
|
return [('id', 'in', branch.ids)] |
||||
|
|
||||
|
branch_id = fields.Many2one('res.branch', string='Branch', store=True, |
||||
|
domain=_get_branch_domain, |
||||
|
help='Leave this field empty if this account is' |
||||
|
' shared between all branches') |
@ -0,0 +1,106 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
############################################################################# |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# |
||||
|
# Copyright (C) 2022-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 LESSER |
||||
|
# GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. |
||||
|
# |
||||
|
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE |
||||
|
# (LGPL v3) along with this program. |
||||
|
# If not, see <http://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
############################################################################# |
||||
|
|
||||
|
from odoo import models, fields, api |
||||
|
|
||||
|
|
||||
|
class AccountJournal(models.Model): |
||||
|
"""inherited account journal""" |
||||
|
_inherit = "account.journal" |
||||
|
|
||||
|
def _get_branch_domain(self): |
||||
|
"""methode to get branch domain""" |
||||
|
company = self.env.company |
||||
|
branch_ids = self.env.user.branch_ids |
||||
|
branch = branch_ids.filtered( |
||||
|
lambda branch: branch.company_id == company) |
||||
|
return [('id', 'in', branch.ids)] |
||||
|
|
||||
|
branch_id = fields.Many2one('res.branch', string='Branch', |
||||
|
domain=_get_branch_domain, |
||||
|
help='Leave this field empty if this journal is' |
||||
|
' shared between all branches') |
||||
|
|
||||
|
default_account_id = fields.Many2one( |
||||
|
comodel_name='account.account', check_company=True, copy=False, |
||||
|
ondelete='restrict', |
||||
|
string='Default Account', |
||||
|
domain="[('deprecated', '=', False), ('company_id', '=', company_id)," |
||||
|
"'|', ('user_type_id', '=', default_account_type), " |
||||
|
"('user_type_id', 'in', type_control_ids)," |
||||
|
"('user_type_id.type', 'not in', ('receivable', 'payable'))," |
||||
|
"'|',('branch_id', '=', branch_id), ('branch_id', '=', False)]") |
||||
|
|
||||
|
suspense_account_id = fields.Many2one( |
||||
|
comodel_name='account.account', check_company=True, ondelete='restrict', |
||||
|
readonly=False, store=True, |
||||
|
compute='_compute_suspense_account_id', |
||||
|
help="Bank statements transactions will be posted on the suspense " |
||||
|
"account until the final reconciliation " |
||||
|
"allowing finding the right account.", string='Suspense Account', |
||||
|
domain=lambda self: "[('deprecated', '=', False), " |
||||
|
"('company_id', '=', company_id), \ |
||||
|
('user_type_id.type', 'not in', " |
||||
|
"('receivable', 'payable')), \ |
||||
|
('user_type_id', '=', %s), '|'," |
||||
|
"('branch_id', '=', branch_id), " |
||||
|
"('branch_id', '=', False)]" % self.env.ref( |
||||
|
'account.data_account_type_current_liabilities').id) |
||||
|
|
||||
|
profit_account_id = fields.Many2one( |
||||
|
comodel_name='account.account', check_company=True, |
||||
|
help="Used to register a profit when the ending balance of a cash " |
||||
|
"register differs from what the system computes", |
||||
|
string='Profit Account', |
||||
|
domain=lambda self: "[('deprecated', '=', False), " |
||||
|
"('company_id', '=', company_id), \ |
||||
|
('user_type_id.type', 'not in', " |
||||
|
"('receivable', 'payable')), \ |
||||
|
('user_type_id', 'in', %s)," |
||||
|
"'|', ('branch_id', '=', branch_id), " |
||||
|
"('branch_id', '=', False)]" % [ |
||||
|
self.env.ref( |
||||
|
'account.data_account_type_revenue').id, |
||||
|
self.env.ref( |
||||
|
'account.data_account_type_other_income').id]) |
||||
|
|
||||
|
loss_account_id = fields.Many2one( |
||||
|
comodel_name='account.account', check_company=True, |
||||
|
help="Used to register a loss when the ending balance of a cash " |
||||
|
"register differs from what the system computes", |
||||
|
string='Loss Account', |
||||
|
domain=lambda self: "[('deprecated', '=', False), " |
||||
|
"('company_id', '=', company_id), \ |
||||
|
('user_type_id.type', 'not in', " |
||||
|
"('receivable', 'payable')), \ |
||||
|
('user_type_id', '=', %s), '|', " |
||||
|
"('branch_id', '=', branch_id), " |
||||
|
"('branch_id', '=', False)]" % self.env.ref( |
||||
|
'account.data_account_type_expenses').id) |
||||
|
|
||||
|
@api.onchange('branch_id') |
||||
|
def onchange_branch_id(self): |
||||
|
"""onchange methode""" |
||||
|
self.default_account_id = False |
||||
|
self.suspense_account_id = False |
||||
|
self.profit_account_id = False |
||||
|
self.loss_account_id = False |
@ -0,0 +1,198 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
############################################################################# |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# |
||||
|
# Copyright (C) 2022-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 LESSER |
||||
|
# GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. |
||||
|
# |
||||
|
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE |
||||
|
# (LGPL v3) along with this program. |
||||
|
# If not, see <http://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
############################################################################# |
||||
|
|
||||
|
from odoo import models, fields, api, _ |
||||
|
from odoo.exceptions import UserError |
||||
|
from odoo.exceptions import ValidationError |
||||
|
|
||||
|
|
||||
|
class AccountMove(models.Model): |
||||
|
"""inherited account move""" |
||||
|
_inherit = "account.move" |
||||
|
|
||||
|
@api.model |
||||
|
def _search_default_journal(self, journal_types): |
||||
|
"""methode to set default journal""" |
||||
|
if len(self.env.user.branch_ids) == 1: |
||||
|
branch_id = self.env.user.branch_id.id |
||||
|
domain = [('branch_id', '=', self.branch_id), |
||||
|
('type', 'in', journal_types)] |
||||
|
journal = None |
||||
|
if self._context.get('default_currency_id'): |
||||
|
currency_domain = domain + [ |
||||
|
('currency_id', '=', self._context['default_currency_id'])] |
||||
|
journal = self.env['account.journal'].search(currency_domain, |
||||
|
limit=1) |
||||
|
if not journal: |
||||
|
journal = self.env['account.journal'].search(domain, limit=1) |
||||
|
if not journal: |
||||
|
domain = [('type', 'in', journal_types), |
||||
|
('branch_id', '=', False)] |
||||
|
journal = self.env['account.journal'].search(domain, limit=1) |
||||
|
if not journal: |
||||
|
branch = self.env.user.branch_id |
||||
|
error_msg = _( |
||||
|
"No journal could be found in %(branch)s branch for " |
||||
|
"any of those types: %(journal_types)s", |
||||
|
branch=branch.name, |
||||
|
journal_types=', '.join(journal_types), |
||||
|
) |
||||
|
raise UserError(error_msg) |
||||
|
return journal |
||||
|
else: |
||||
|
company_id = self.company_id.id if self.company_id else self._context.get('default_company_id', |
||||
|
self.env.company.id) |
||||
|
|
||||
|
domain = [('company_id', '=', company_id), |
||||
|
('type', 'in', journal_types)] |
||||
|
journal = None |
||||
|
if self._context.get('default_currency_id'): |
||||
|
currency_domain = domain + [ |
||||
|
('currency_id', '=', self._context['default_currency_id'])] |
||||
|
journal = self.env['account.journal'].search(currency_domain, |
||||
|
limit=1) |
||||
|
if not journal: |
||||
|
journal = self.env['account.journal'].search(domain, limit=1) |
||||
|
if not journal: |
||||
|
company = self.env['res.company'].browse(company_id) |
||||
|
error_msg = _( |
||||
|
"No journal could be found in company %(company_name)s for " |
||||
|
"any of those types: %(journal_types)s", |
||||
|
company_name=company.display_name, |
||||
|
journal_types=', '.join(journal_types), |
||||
|
) |
||||
|
raise UserError(error_msg) |
||||
|
|
||||
|
return journal |
||||
|
|
||||
|
def _get_default_branch(self): |
||||
|
branch = False |
||||
|
if len(self.env.user.branch_ids) == 1: |
||||
|
branch = self.env.user.branch_id |
||||
|
return branch |
||||
|
|
||||
|
def _get_branch_domain(self): |
||||
|
"""methode to get branch domain""" |
||||
|
company = self.env.company |
||||
|
branch_ids = self.env.user.branch_ids |
||||
|
branch = branch_ids.filtered( |
||||
|
lambda branch: branch.company_id == company) |
||||
|
return [('id', 'in', branch.ids)] |
||||
|
|
||||
|
branch_id = fields.Many2one('res.branch', string='Branch', store=True, |
||||
|
readonly=False, |
||||
|
default=_get_default_branch, |
||||
|
domain=_get_branch_domain) |
||||
|
|
||||
|
@api.onchange('branch_id') |
||||
|
def onchange_branch_id(self): |
||||
|
"""onchange methode""" |
||||
|
move_type = self._context.get('default_move_type', 'entry') |
||||
|
if move_type in self.get_sale_types(include_receipts=True): |
||||
|
journal_types = ['sale'] |
||||
|
elif move_type in self.get_purchase_types(include_receipts=True): |
||||
|
journal_types = ['purchase'] |
||||
|
else: |
||||
|
journal_types = self._context.get('default_move_journal_types', ['general']) |
||||
|
branch_id = self.branch_id.id |
||||
|
domain = [('branch_id', '=', branch_id), |
||||
|
('type', 'in', journal_types)] |
||||
|
journal = None |
||||
|
if self._context.get('default_currency_id'): |
||||
|
currency_domain = domain + [ |
||||
|
('currency_id', '=', self._context['default_currency_id'])] |
||||
|
journal = self.env['account.journal'].search(currency_domain, |
||||
|
limit=1) |
||||
|
if not journal: |
||||
|
journal = self.env['account.journal'].search(domain, limit=1) |
||||
|
if not journal: |
||||
|
domain = [('type', 'in', journal_types), |
||||
|
('branch_id', '=', False)] |
||||
|
journal = self.env['account.journal'].search(domain, limit=1) |
||||
|
if not journal and journal_types: |
||||
|
branch = self.branch_id |
||||
|
error_msg = _( |
||||
|
"No journal could be found in %(branch)s branch for " |
||||
|
"any of those types: %(journal_types)s", |
||||
|
branch=branch.name, |
||||
|
journal_types=', '.join(journal_types), |
||||
|
) |
||||
|
raise UserError(error_msg) |
||||
|
self.journal_id = journal |
||||
|
|
||||
|
@api.depends('company_id', 'invoice_filter_type_domain') |
||||
|
def _compute_suitable_journal_ids(self): |
||||
|
"""methode to compute suitable journal ids""" |
||||
|
if self.branch_id: |
||||
|
for m in self: |
||||
|
journal_type = m.invoice_filter_type_domain or 'general' |
||||
|
branch_id = m.branch_id.id #or self.env.user.branch_id.id |
||||
|
domain = [('type', '=', journal_type), |
||||
|
'|', ('branch_id', '=', branch_id), |
||||
|
('branch_id', '=', False)] |
||||
|
m.suitable_journal_ids = self.env['account.journal'].search( |
||||
|
domain) |
||||
|
|
||||
|
else: |
||||
|
for m in self: |
||||
|
journal_type = m.invoice_filter_type_domain or 'general' |
||||
|
company_id = m.company_id.id if m.company_id else self.env.company.id |
||||
|
domain = [('company_id', '=', company_id), |
||||
|
('branch_id', '=', False), |
||||
|
('type', '=', journal_type)] |
||||
|
m.suitable_journal_ids = self.env['account.journal'].search( |
||||
|
domain) |
||||
|
|
||||
|
@api.constrains('branch_id', 'line_ids') |
||||
|
def _check_move_line_branch_id(self): |
||||
|
"""methode to check branch of accounts and entry""" |
||||
|
for move in self: |
||||
|
branches = move.line_ids.account_id.branch_id |
||||
|
if branches and branches != move.branch_id: |
||||
|
bad_accounts = move.line_ids.account_id.filtered( |
||||
|
lambda a: a.branch_id and a.branch_id != move.branch_id) |
||||
|
raise ValidationError(_( |
||||
|
"Your items contains accounts from %(line_branch)s branch" |
||||
|
" whereas your entry belongs to %(move_branch)s branch. " |
||||
|
"\n Please change the branch of your entry or remove the " |
||||
|
"accounts from other branches (%(bad_accounts)s).", |
||||
|
line_branch=', '.join(branches.mapped('name')), |
||||
|
move_branch=move.branch_id.name, |
||||
|
bad_accounts=', '.join(bad_accounts.mapped('name')), |
||||
|
)) |
||||
|
|
||||
|
|
||||
|
class AccountMoveLine(models.Model): |
||||
|
"""inherited account move line""" |
||||
|
_inherit = "account.move.line" |
||||
|
|
||||
|
branch_id = fields.Many2one('res.branch', related='move_id.branch_id', |
||||
|
string='Branch', store=True) |
||||
|
|
||||
|
account_id = fields.Many2one( |
||||
|
'account.account', string='Account', |
||||
|
index=True, ondelete="cascade", |
||||
|
domain="[('deprecated', '=', False), ('company_id', '=', 'company_id')," |
||||
|
"('is_off_balance', '=', False), '|', " |
||||
|
"('branch_id', '=', branch_id), ('branch_id', '=', False)]", |
||||
|
check_company=True, |
||||
|
tracking=True) |
@ -0,0 +1,108 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
############################################################################# |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# |
||||
|
# Copyright (C) 2022-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 LESSER |
||||
|
# GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. |
||||
|
# |
||||
|
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE |
||||
|
# (LGPL v3) along with this program. |
||||
|
# If not, see <http://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
############################################################################# |
||||
|
|
||||
|
from odoo import models, fields, api, _ |
||||
|
from odoo.exceptions import ValidationError |
||||
|
|
||||
|
|
||||
|
class AccountMove(models.Model): |
||||
|
"""inherited account payment""" |
||||
|
_inherit = "account.payment" |
||||
|
|
||||
|
destination_account_id = fields.Many2one( |
||||
|
comodel_name='account.account', |
||||
|
string='Destination Account', |
||||
|
store=True, readonly=False, |
||||
|
compute='_compute_destination_account_id', |
||||
|
domain="[('user_type_id.type', 'in', ('receivable', 'payable')), " |
||||
|
"('company_id', '=', company_id)," |
||||
|
"'|', ('branch_id', '=', branch_id), ('branch_id', '=', False)]", |
||||
|
check_company=True) |
||||
|
|
||||
|
@api.constrains('branch_id') |
||||
|
def _check_payment_branch_id(self): |
||||
|
"""methode to check branch of accounts and entry""" |
||||
|
for payment in self: |
||||
|
branch = payment.destination_account_id.branch_id |
||||
|
if branch and branch != payment.branch_id: |
||||
|
raise ValidationError(_( |
||||
|
"Your payment belongs to '%s' branch whereas the account" |
||||
|
" belongs to '%s' branch.", payment.branch_id.name, |
||||
|
branch.name)) |
||||
|
|
||||
|
@api.depends('journal_id', 'branch_id', 'partner_id', 'partner_type', |
||||
|
'is_internal_transfer') |
||||
|
def _compute_destination_account_id(self): |
||||
|
"""methode to compute destination account""" |
||||
|
if self.branch_id: |
||||
|
self.destination_account_id = False |
||||
|
for pay in self: |
||||
|
if pay.is_internal_transfer: |
||||
|
pay.destination_account_id = \ |
||||
|
pay.journal_id.company_id.transfer_account_id |
||||
|
elif pay.partner_type == 'customer': |
||||
|
# Receive money from invoice or send money to refund it. |
||||
|
if pay.partner_id: |
||||
|
pay.destination_account_id = \ |
||||
|
pay.partner_id.with_company( |
||||
|
pay.company_id).property_account_receivable_id |
||||
|
else: |
||||
|
destination_account = self.env[ |
||||
|
'account.account'].search([ |
||||
|
('company_id', '=', pay.company_id.id), |
||||
|
('branch_id', '=', pay.branch_id.id), |
||||
|
('internal_type', '=', 'receivable'), |
||||
|
], limit=1) |
||||
|
pay.destination_account_id = destination_account |
||||
|
if not destination_account: |
||||
|
destination_account = self.env[ |
||||
|
'account.account'].search([ |
||||
|
('company_id', '=', pay.company_id.id), |
||||
|
('branch_id', '=', False), |
||||
|
('internal_type', '=', 'receivable'), |
||||
|
], limit=1) |
||||
|
pay.destination_account_id = destination_account |
||||
|
elif pay.partner_type == 'supplier': |
||||
|
# Send money to pay a bill or receive money to refund it. |
||||
|
if pay.partner_id: |
||||
|
pay.destination_account_id = \ |
||||
|
pay.partner_id.with_company( |
||||
|
pay.company_id).property_account_payable_id |
||||
|
else: |
||||
|
destination_account = self.env[ |
||||
|
'account.account'].search([ |
||||
|
('company_id', '=', pay.company_id.id), |
||||
|
('branch_id', '=', pay.branch_id.id), |
||||
|
('internal_type', '=', 'payable'), |
||||
|
], limit=1) |
||||
|
pay.destination_account_id = destination_account |
||||
|
if not destination_account: |
||||
|
destination_account = self.env[ |
||||
|
'account.account'].search([ |
||||
|
('company_id', '=', pay.company_id.id), |
||||
|
('branch_id', '=', False), |
||||
|
('internal_type', '=', 'payable'), |
||||
|
], limit=1) |
||||
|
pay.destination_account_id = destination_account |
||||
|
else: |
||||
|
res = super(AccountMove, self)._compute_destination_account_id() |
||||
|
return res |
@ -0,0 +1,47 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
############################################################################# |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# |
||||
|
# Copyright (C) 2022-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 LESSER |
||||
|
# GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. |
||||
|
# |
||||
|
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE |
||||
|
# (LGPL v3) along with this program. |
||||
|
# If not, see <http://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
############################################################################# |
||||
|
|
||||
|
from odoo import models, fields, api |
||||
|
|
||||
|
|
||||
|
class ProductTemplate(models.Model): |
||||
|
"""inherited product""" |
||||
|
_inherit = 'product.template' |
||||
|
|
||||
|
|
||||
|
|
||||
|
branch_id = fields.Many2one("res.branch", string='Branch', store=True, |
||||
|
readonly=False, |
||||
|
compute="_compute_branch") |
||||
|
|
||||
|
@api.depends('company_id') |
||||
|
def _compute_branch(self): |
||||
|
for order in self: |
||||
|
company = self.env.company |
||||
|
so_company = order.company_id if order.company_id else self.env.company |
||||
|
branch_ids = self.env.user.branch_ids |
||||
|
branch = branch_ids.filtered( |
||||
|
lambda branch: branch.company_id == so_company) |
||||
|
if branch: |
||||
|
order.branch_id = branch.ids[0] |
||||
|
else: |
||||
|
order.branch_id = False |
@ -0,0 +1,189 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
############################################################################# |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# |
||||
|
# Copyright (C) 2022-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 LESSER |
||||
|
# GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. |
||||
|
# |
||||
|
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE |
||||
|
# (LGPL v3) along with this program. |
||||
|
# If not, see <http://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
############################################################################# |
||||
|
|
||||
|
from odoo import models, fields, api, _ |
||||
|
from odoo.exceptions import UserError |
||||
|
from odoo.addons.purchase.models.purchase import PurchaseOrder as Purchase |
||||
|
from odoo.exceptions import ValidationError |
||||
|
|
||||
|
|
||||
|
class PurchaseOrder(models.Model): |
||||
|
"""inherited purchase order""" |
||||
|
_inherit = 'purchase.order' |
||||
|
|
||||
|
branch_id = fields.Many2one("res.branch", string='Branch', store=True, |
||||
|
readonly=False, |
||||
|
compute="_compute_branch") |
||||
|
|
||||
|
@api.depends('company_id') |
||||
|
def _compute_branch(self): |
||||
|
for order in self: |
||||
|
company = self.env.company |
||||
|
so_company = order.company_id if order.company_id else self.env.company |
||||
|
branch_ids = self.env.user.branch_ids |
||||
|
branch = branch_ids.filtered( |
||||
|
lambda branch: branch.company_id == so_company) |
||||
|
if branch: |
||||
|
order.branch_id = branch.ids[0] |
||||
|
else: |
||||
|
order.branch_id = False |
||||
|
|
||||
|
@api.model |
||||
|
def _get_picking_type(self, company_id): |
||||
|
"""methode to set default picking type""" |
||||
|
if len(self.env.user.branch_ids) == 1: |
||||
|
picking_type = self.env['stock.picking.type'].search( |
||||
|
[('code', '=', 'incoming'), |
||||
|
('warehouse_id.branch_id', '=', company_id)]) |
||||
|
if not picking_type: |
||||
|
picking_type = self.env['stock.picking.type'].search( |
||||
|
[('code', '=', 'incoming'), |
||||
|
('warehouse_id.branch_id', '=', False)]) |
||||
|
if not picking_type: |
||||
|
error_msg = _( |
||||
|
"No warehouse could be found in the '%s' branch", |
||||
|
self.env.user.branch_id.name |
||||
|
) |
||||
|
raise UserError(error_msg) |
||||
|
return picking_type[:1] |
||||
|
else: |
||||
|
res = super(PurchaseOrder, self)._get_picking_type(company_id) |
||||
|
return res |
||||
|
|
||||
|
@api.model |
||||
|
def _default_picking_type(self): |
||||
|
"""methode to get default picking type""" |
||||
|
if len(self.env.user.branch_ids) == 1: |
||||
|
branch = self.env.user.branch_id |
||||
|
if branch: |
||||
|
return self._get_picking_type(branch.id) |
||||
|
else: |
||||
|
return self._get_picking_type(self.env.context.get('company_id') |
||||
|
or self.env.company.id) |
||||
|
|
||||
|
picking_type_id = fields.Many2one( |
||||
|
'stock.picking.type', 'Deliver To', |
||||
|
states=Purchase.READONLY_STATES, |
||||
|
required=True, |
||||
|
default=_default_picking_type, |
||||
|
domain="[('code','=','incoming'), " |
||||
|
"('warehouse_id.company_id', '=', company_id)," |
||||
|
"'|', ('warehouse_id.branch_id', '=', branch_id)," |
||||
|
"('warehouse_id.branch_id', '=', False),]", |
||||
|
help="This will determine operation type" |
||||
|
" of incoming shipment") |
||||
|
|
||||
|
@api.constrains('branch_id', 'partner_id') |
||||
|
def _check_partner_branch_id(self): |
||||
|
"""methode to check branch of partner and purchase order""" |
||||
|
for order in self: |
||||
|
branch = order.partner_id.branch_id |
||||
|
if branch and branch != order.branch_id: |
||||
|
raise ValidationError(_( |
||||
|
"Your quotation vendor is from %(partner_branch)s " |
||||
|
"branch whereas your quotation belongs to %(quote_branch)s" |
||||
|
" branch \n Please change the " |
||||
|
"branch of your quotation or remove the vendor from " |
||||
|
"other branch.", |
||||
|
partner_branch=branch.name, |
||||
|
quote_branch=order.branch_id.name, |
||||
|
)) |
||||
|
|
||||
|
@api.constrains('branch_id', 'order_line') |
||||
|
def _check_order_line_branch_id(self): |
||||
|
"""methode to check branch of products and purchase order""" |
||||
|
for order in self: |
||||
|
branches = order.order_line.product_id.branch_id |
||||
|
if branches and branches != order.branch_id: |
||||
|
bad_products = order.order_line.product_id.filtered( |
||||
|
lambda p: p.branch_id and p.branch_id != order.branch_id) |
||||
|
raise ValidationError(_( |
||||
|
"Your quotation contains products from %(product_branch)s " |
||||
|
"branch whereas your quotation belongs to %(quote_branch)s" |
||||
|
" branch \n Please change the " |
||||
|
"branch of your quotation or remove the products from " |
||||
|
"other branches (%(bad_products)s).", |
||||
|
product_branch=', '.join(branches.mapped('name')), |
||||
|
quote_branch=order.branch_id.name, |
||||
|
bad_products=', '.join(bad_products.mapped('display_name')), |
||||
|
)) |
||||
|
|
||||
|
def _prepare_invoice(self): |
||||
|
"""override prepare_invoice function to include branch""" |
||||
|
invoice_vals = super(PurchaseOrder, self)._prepare_invoice() |
||||
|
branch_id = self.branch_id.id |
||||
|
domain = [('branch_id', '=', branch_id), |
||||
|
('type', '=', 'purchase'), ('company_id', '=', self.company_id.id)] |
||||
|
journal = None |
||||
|
|
||||
|
if self._context.get('default_currency_id'): |
||||
|
currency_domain = domain + [ |
||||
|
('currency_id', '=', self._context['default_currency_id'])] |
||||
|
journal = self.env['account.journal'].search(currency_domain, |
||||
|
limit=1) |
||||
|
|
||||
|
if not journal: |
||||
|
journal = self.env['account.journal'].search(domain, limit=1) |
||||
|
if not journal: |
||||
|
domain = [('type', '=', 'purchase'), |
||||
|
('branch_id', '=', False), ('company_id', '=', self.company_id.id)] |
||||
|
journal = self.env['account.journal'].search(domain, limit=1) |
||||
|
if not journal: |
||||
|
error_msg = _( |
||||
|
"No journal could be found in the'%s' branch" |
||||
|
" for any of those types: purchase", self.branch_id.name,) |
||||
|
raise UserError(error_msg) |
||||
|
invoice_vals['branch_id'] = self.branch_id.id or False |
||||
|
invoice_vals['journal_id'] = journal.id |
||||
|
return invoice_vals |
||||
|
|
||||
|
@api.onchange('branch_id') |
||||
|
def onchange_branch_id(self): |
||||
|
"""onchange function""" |
||||
|
if self.branch_id and self.branch_id not in self.env.user.branch_ids and self.env.user.branch_ids: |
||||
|
raise UserError("Unauthorised Branch") |
||||
|
self.picking_type_id = False |
||||
|
if self.branch_id: |
||||
|
picking_type = self.env['stock.picking.type'].sudo().search( |
||||
|
[('branch_id', '=', self.branch_id.id), ('company_id', '=', self.company_id.id)], limit=1) |
||||
|
self.picking_type_id = picking_type |
||||
|
if not picking_type: |
||||
|
picking_type = self.env['stock.picking.type'].sudo().search( |
||||
|
[('branch_id', '=', False), ('company_id', '=', self.company_id.id)], limit=1) |
||||
|
self.picking_type_id = picking_type |
||||
|
if not picking_type: |
||||
|
error_msg = _( |
||||
|
"No warehouse could be found in the '%s' branch", |
||||
|
self.branch_id.name |
||||
|
) |
||||
|
raise UserError(error_msg) |
||||
|
else: |
||||
|
self.picking_type_id = self.env['stock.picking.type'].sudo().search( |
||||
|
[('branch_id', '=', False), ('company_id', '=', self.company_id.id)], limit=1) |
||||
|
|
||||
|
|
||||
|
class PurchaseOrderLine(models.Model): |
||||
|
"""inherited purchase order line""" |
||||
|
_inherit = 'purchase.order.line' |
||||
|
|
||||
|
branch_id = fields.Many2one(related='order_id.branch_id', string='Branch', |
||||
|
store=True) |
@ -0,0 +1,79 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
############################################################################# |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# |
||||
|
# Copyright (C) 2022-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 LESSER |
||||
|
# GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. |
||||
|
# |
||||
|
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE |
||||
|
# (LGPL v3) along with this program. |
||||
|
# If not, see <http://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
############################################################################# |
||||
|
|
||||
|
from odoo import models, fields, api |
||||
|
|
||||
|
|
||||
|
class BranchPartner(models.Model): |
||||
|
"""inherited partner""" |
||||
|
_inherit = "res.partner" |
||||
|
|
||||
|
branch_id = fields.Many2one("res.branch", string='Branch', store=True, |
||||
|
readonly=False, |
||||
|
compute="_compute_branch") |
||||
|
|
||||
|
@api.depends('company_id') |
||||
|
def _compute_branch(self): |
||||
|
for order in self: |
||||
|
company = self.env.company |
||||
|
so_company = order.company_id if order.company_id else self.env.company |
||||
|
branch_ids = self.env.user.branch_ids |
||||
|
branch = branch_ids.filtered( |
||||
|
lambda branch: branch.company_id == so_company) |
||||
|
if branch: |
||||
|
order.branch_id = branch.ids[0] |
||||
|
else: |
||||
|
order.branch_id = False |
||||
|
|
||||
|
@api.model |
||||
|
def default_get(self, default_fields): |
||||
|
"""Add the company of the parent as default if we are creating a |
||||
|
child partner.Also take the parent lang by default if any, otherwise, |
||||
|
fallback to default DB lang.""" |
||||
|
values = super().default_get(default_fields) |
||||
|
parent = self.env["res.partner"] |
||||
|
if 'parent_id' in default_fields and values.get('parent_id'): |
||||
|
parent = self.browse(values.get('parent_id')) |
||||
|
values['branch_id'] = parent.branch_id.id |
||||
|
return values |
||||
|
|
||||
|
@api.onchange('parent_id', 'branch_id') |
||||
|
def _onchange_parent_id(self): |
||||
|
"""methode to set branch on changing the parent company""" |
||||
|
if self.parent_id: |
||||
|
self.branch_id = self.parent_id.branch_id.id |
||||
|
|
||||
|
def write(self, vals): |
||||
|
"""override write methode""" |
||||
|
if vals.get('branch_id'): |
||||
|
branch_id = vals['branch_id'] |
||||
|
for partner in self: |
||||
|
# if partner.child_ids: |
||||
|
for child in partner.child_ids: |
||||
|
child.write({'branch_id': branch_id}) |
||||
|
else: |
||||
|
for partner in self: |
||||
|
# if partner.child_ids: |
||||
|
for child in partner.child_ids: |
||||
|
child.write({'branch_id': False}) |
||||
|
result = super(BranchPartner, self).write(vals) |
||||
|
return result |
@ -0,0 +1,69 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
############################################################################# |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# |
||||
|
# Copyright (C) 2022-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 LESSER |
||||
|
# GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. |
||||
|
# |
||||
|
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE |
||||
|
# (LGPL v3) along with this program. |
||||
|
# If not, see <http://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
############################################################################# |
||||
|
|
||||
|
from odoo import models, fields, api, _ |
||||
|
from odoo import exceptions |
||||
|
from odoo.exceptions import UserError |
||||
|
|
||||
|
|
||||
|
class ResUsers(models.Model): |
||||
|
"""inherited res users""" |
||||
|
_inherit = "res.users" |
||||
|
|
||||
|
branch_ids = fields.Many2many('res.branch', string='Allowed Branches', |
||||
|
domain="[('company_id', '=', company_ids)]") |
||||
|
branch_id = fields.Many2one("res.branch", string='Default Branch', |
||||
|
default=False, |
||||
|
domain="[('id', '=', branch_ids)]") |
||||
|
|
||||
|
@api.constrains('branch_id') |
||||
|
def branch_constrains(self): |
||||
|
"""branch constrains""" |
||||
|
company = self.env.company |
||||
|
for user in self: |
||||
|
if user.branch_id and user.branch_id.company_id != company: |
||||
|
raise exceptions.UserError(_("Sorry! The selected Branch does " |
||||
|
"not belong to the current Company" |
||||
|
" '%s'", company.name)) |
||||
|
|
||||
|
def _get_default_warehouse_id(self): |
||||
|
"""methode to get default warehouse id""" |
||||
|
if self.property_warehouse_id: |
||||
|
return self.property_warehouse_id |
||||
|
# !!! Any change to the following search domain should probably |
||||
|
# be also applied in sale_stock/models/sale_order.py/_init_column. |
||||
|
if len(self.env.user.branch_ids) == 1: |
||||
|
warehouse = self.env['stock.warehouse'].search([ |
||||
|
('branch_id', '=', self.env.user.branch_id.id)], limit=1) |
||||
|
if not warehouse: |
||||
|
warehouse = self.env['stock.warehouse'].search([ |
||||
|
('branch_id', '=', False)], limit=1) |
||||
|
if not warehouse: |
||||
|
error_msg = _( |
||||
|
"No warehouse could be found in the '%s' branch", |
||||
|
self.env.user.branch_id.name |
||||
|
) |
||||
|
raise UserError(error_msg) |
||||
|
return warehouse |
||||
|
else: |
||||
|
return self.env['stock.warehouse'].search([ |
||||
|
('company_id', '=', self.env.company.id)], limit=1) |
@ -0,0 +1,167 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
############################################################################# |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# |
||||
|
# Copyright (C) 2022-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 LESSER |
||||
|
# GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. |
||||
|
# |
||||
|
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE |
||||
|
# (LGPL v3) along with this program. |
||||
|
# If not, see <http://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
############################################################################# |
||||
|
|
||||
|
from odoo import models, fields, api, _ |
||||
|
from odoo.exceptions import UserError |
||||
|
from odoo.exceptions import ValidationError |
||||
|
|
||||
|
|
||||
|
class SaleOrder(models.Model): |
||||
|
"""inherited sale order""" |
||||
|
_inherit = 'sale.order' |
||||
|
|
||||
|
@api.model |
||||
|
def _default_warehouse_id(self): |
||||
|
"""methode to get default warehouse id""" |
||||
|
# !!! Any change to the default value may have to be repercuted |
||||
|
# on _init_column() below. |
||||
|
return self.env.user._get_default_warehouse_id() |
||||
|
|
||||
|
branch_id = fields.Many2one("res.branch", string='Branch', store=True, |
||||
|
readonly=False, |
||||
|
compute="_compute_branch") |
||||
|
warehouse_id = fields.Many2one( |
||||
|
'stock.warehouse', string='Warehouse', |
||||
|
required=True, readonly=True, states={'draft': [('readonly', False)], |
||||
|
'sent': [('readonly', False)]}, |
||||
|
default=_default_warehouse_id, check_company=True, |
||||
|
) |
||||
|
|
||||
|
@api.depends('company_id') |
||||
|
def _compute_branch(self): |
||||
|
for order in self: |
||||
|
company = self.env.company |
||||
|
so_company = order.company_id if order.company_id else self.env.company |
||||
|
branch_ids = self.env.user.branch_ids |
||||
|
branch = branch_ids.filtered( |
||||
|
lambda branch: branch.company_id == so_company) |
||||
|
if branch: |
||||
|
order.branch_id = branch.ids[0] |
||||
|
else: |
||||
|
order.branch_id = False |
||||
|
|
||||
|
|
||||
|
@api.constrains('branch_id', 'partner_id') |
||||
|
def _check_partner_branch_id(self): |
||||
|
"""methode to check branch of partner and sale order""" |
||||
|
for order in self: |
||||
|
branch = order.partner_id.branch_id |
||||
|
if branch and branch != order.branch_id: |
||||
|
raise ValidationError(_( |
||||
|
"Your quotation customer have company branch " |
||||
|
"%(partner_branch)s whereas your quotation belongs to " |
||||
|
"company branch %(quote_branch)s. \n Please change the " |
||||
|
"company of your quotation or change the customer from " |
||||
|
"other branch", |
||||
|
partner_branch=branch.name, |
||||
|
quote_branch=order.branch_id.name, |
||||
|
)) |
||||
|
|
||||
|
@api.constrains('branch_id', 'order_line') |
||||
|
def _check_order_line_branch_id(self): |
||||
|
"""methode to check branch of products and sale order""" |
||||
|
for order in self: |
||||
|
branches = order.order_line.product_id.branch_id |
||||
|
if branches and branches != order.branch_id: |
||||
|
bad_products = order.order_line.product_id.filtered( |
||||
|
lambda p: p.branch_id and p.branch_id != order.branch_id) |
||||
|
raise ValidationError(_( |
||||
|
"Your quotation contains products from company branch " |
||||
|
"%(product_branch)s whereas your quotation belongs to " |
||||
|
"company branch %(quote_branch)s. \n Please change the " |
||||
|
"company of your quotation or remove the products from " |
||||
|
"other companies (%(bad_products)s).", |
||||
|
product_branch=', '.join(branches.mapped('name')), |
||||
|
quote_branch=order.branch_id.name, |
||||
|
bad_products=', '.join(bad_products.mapped('display_name')), |
||||
|
)) |
||||
|
|
||||
|
|
||||
|
|
||||
|
def _prepare_invoice(self): |
||||
|
"""override prepare_invoice function to include branch""" |
||||
|
invoice_vals = super(SaleOrder, self)._prepare_invoice() |
||||
|
branch_id = self.branch_id.id |
||||
|
domain = [('branch_id', '=', branch_id), |
||||
|
('type', '=', 'sale'), |
||||
|
('code', '!=', 'POSS'),('company_id', '=', self.company_id.id)] |
||||
|
|
||||
|
journal = None |
||||
|
if self._context.get('default_currency_id'): |
||||
|
currency_domain = domain + [ |
||||
|
('currency_id', '=', self._context['default_currency_id'])] |
||||
|
journal = self.env['account.journal'].search(currency_domain, |
||||
|
limit=1) |
||||
|
|
||||
|
if not journal: |
||||
|
journal = self.env['account.journal'].search(domain, limit=1) |
||||
|
if not journal: |
||||
|
domain = [('type', '=', 'sale'), ('code', '!=', 'POSS'), |
||||
|
('branch_id', '=', False), ('company_id', '=', self.company_id.id)] |
||||
|
journal = self.env['account.journal'].search(domain, limit=1) |
||||
|
if not journal: |
||||
|
error_msg = _( |
||||
|
"No journal could be found in the '%s' branch" |
||||
|
" for any of those types: sale", |
||||
|
self.branch_id.name, |
||||
|
) |
||||
|
raise UserError(error_msg) |
||||
|
|
||||
|
invoice_vals['branch_id'] = self.branch_id.id or False |
||||
|
invoice_vals['journal_id'] = journal.id |
||||
|
return invoice_vals |
||||
|
|
||||
|
@api.onchange('branch_id') |
||||
|
def onchange_branch_id(self): |
||||
|
"""onchange methode""" |
||||
|
|
||||
|
if self.branch_id and self.branch_id not in self.env.user.branch_ids and self.env.user.branch_ids: |
||||
|
raise UserError("Unauthorised Branch") |
||||
|
self.warehouse_id = False |
||||
|
if self.branch_id: |
||||
|
warehouse = self.env['stock.warehouse'].sudo().search( |
||||
|
[('branch_id', '=', self.branch_id.id), ('company_id', '=', self.company_id.id)], limit=1) |
||||
|
self.warehouse_id = warehouse |
||||
|
if not warehouse: |
||||
|
|
||||
|
warehouse = self.env['stock.warehouse'].sudo().search([ |
||||
|
('branch_id', '=', False), ('company_id', '=', self.company_id.id)], limit=1) |
||||
|
self.warehouse_id = warehouse |
||||
|
if not warehouse: |
||||
|
error_msg = _( |
||||
|
"No warehouse could be found in the '%s' branch", |
||||
|
self.branch_id.name |
||||
|
) |
||||
|
raise UserError(error_msg) |
||||
|
else: |
||||
|
|
||||
|
self.warehouse_id = self.env['stock.warehouse'].sudo().search([ |
||||
|
('branch_id', '=', False), ('company_id', '=', self.company_id.id)], |
||||
|
limit=1) |
||||
|
|
||||
|
|
||||
|
class SaleOrderLine(models.Model): |
||||
|
"""inherited purchase order line""" |
||||
|
_inherit = 'sale.order.line' |
||||
|
|
||||
|
branch_id = fields.Many2one(related='order_id.branch_id', |
||||
|
string='Branch', store=True) |
@ -0,0 +1,77 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
############################################################################# |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# |
||||
|
# Copyright (C) 2022-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 LESSER |
||||
|
# GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. |
||||
|
# |
||||
|
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE |
||||
|
# (LGPL v3) along with this program. |
||||
|
# If not, see <http://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
############################################################################# |
||||
|
|
||||
|
from odoo import models, fields, api |
||||
|
|
||||
|
|
||||
|
class StockPicking(models.Model): |
||||
|
"""inherited stock.picking""" |
||||
|
_inherit = "stock.picking" |
||||
|
|
||||
|
branch_id = fields.Many2one("res.branch", string='Branch', store=True, |
||||
|
readonly=False, |
||||
|
compute="_compute_branch") |
||||
|
|
||||
|
@api.depends('company_id', 'sale_id', 'purchase_id') |
||||
|
def _compute_branch(self): |
||||
|
for order in self: |
||||
|
company = self.env.company |
||||
|
so_company = order.company_id if order.company_id else self.env.company |
||||
|
branch_ids = self.env.user.branch_ids |
||||
|
branch = branch_ids.filtered( |
||||
|
lambda branch: branch.company_id == so_company) |
||||
|
if branch: |
||||
|
order.branch_id = branch.ids[0] |
||||
|
else: |
||||
|
order.branch_id = False |
||||
|
if order.sale_id or order.purchase_id: |
||||
|
if order.sale_id.branch_id: |
||||
|
order.branch_id = order.sale_id.branch_id |
||||
|
if order.purchase_id.branch_id: |
||||
|
order.branch_id = order.purchase_id.branch_id |
||||
|
|
||||
|
|
||||
|
|
||||
|
# @api.onchange('branch_id') |
||||
|
# def onchange_branch_id(self): |
||||
|
# """onchange methode""" |
||||
|
# self.picking_type_id = False |
||||
|
# self.location_id = False |
||||
|
# self.location_dest_id = False |
||||
|
|
||||
|
@api.depends('sale_id', 'purchase_id') |
||||
|
def _compute_branch_id(self): |
||||
|
"""methode to compute branch""" |
||||
|
for record in self: |
||||
|
record.branch_id = False |
||||
|
if record.sale_id.branch_id: |
||||
|
record.branch_id = record.sale_id.branch_id |
||||
|
if record.purchase_id.branch_id: |
||||
|
record.branch_id = record.purchase_id.branch_id |
||||
|
|
||||
|
|
||||
|
class StockPickingTypes(models.Model): |
||||
|
"""inherited stock picking type""" |
||||
|
_inherit = "stock.picking.type" |
||||
|
|
||||
|
branch_id = fields.Many2one('res.branch', string='Branch', store=True, |
||||
|
related='warehouse_id.branch_id') |
@ -0,0 +1,72 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
############################################################################# |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# |
||||
|
# Copyright (C) 2022-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 LESSER |
||||
|
# GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. |
||||
|
# |
||||
|
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE |
||||
|
# (LGPL v3) along with this program. |
||||
|
# If not, see <http://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
############################################################################# |
||||
|
|
||||
|
from odoo import models, fields, api |
||||
|
|
||||
|
|
||||
|
class StockWarehouse(models.Model): |
||||
|
"""inherited stock warehouse""" |
||||
|
_inherit = "stock.warehouse" |
||||
|
|
||||
|
@api.model |
||||
|
def _get_default_branch(self): |
||||
|
"""methode to get default branch""" |
||||
|
branch_id = self.env.user.branch_id |
||||
|
return branch_id |
||||
|
|
||||
|
def _get_branch_domain(self): |
||||
|
"""methode to get branch domain""" |
||||
|
company = self.env.company |
||||
|
branch_ids = self.env.user.branch_ids |
||||
|
branch = branch_ids.filtered( |
||||
|
lambda branch: branch.company_id == company) |
||||
|
return [('id', 'in', branch.ids)] |
||||
|
|
||||
|
branch_id = fields.Many2one('res.branch', string='Branch', store=True, |
||||
|
default=_get_default_branch, |
||||
|
domain=_get_branch_domain, |
||||
|
help='Leave this field empty if this warehouse ' |
||||
|
' is shared between all branches') |
||||
|
|
||||
|
|
||||
|
class BranchStockMove(models.Model): |
||||
|
"""inherited stock.move""" |
||||
|
_inherit = 'stock.move' |
||||
|
|
||||
|
branch_id = fields.Many2one('res.branch', readonly=True, store=True, |
||||
|
related='picking_id.branch_id') |
||||
|
|
||||
|
|
||||
|
class BranchStockMoveLine(models.Model): |
||||
|
"""inherited stock move line""" |
||||
|
_inherit = 'stock.move.line' |
||||
|
|
||||
|
branch_id = fields.Many2one('res.branch', readonly=True, store=True, |
||||
|
related='move_id.branch_id') |
||||
|
|
||||
|
|
||||
|
class BranchStockValuationLayer(models.Model): |
||||
|
"""Inherited Stock Valuation Layer""" |
||||
|
_inherit = 'stock.valuation.layer' |
||||
|
|
||||
|
branch_id = fields.Many2one('res.branch', readonly=True, store=True, |
||||
|
related='stock_move_id.branch_id') |
@ -0,0 +1,53 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
############################################################################# |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# |
||||
|
# Copyright (C) 2022-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 LESSER |
||||
|
# GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. |
||||
|
# |
||||
|
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE |
||||
|
# (LGPL v3) along with this program. |
||||
|
# If not, see <http://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
############################################################################# |
||||
|
|
||||
|
import logging |
||||
|
from odoo import models, fields |
||||
|
|
||||
|
|
||||
|
_logger = logging.getLogger(__name__) |
||||
|
|
||||
|
|
||||
|
class Branch(models.Model): |
||||
|
"""res branch""" |
||||
|
_name = "res.branch" |
||||
|
_description = 'Company Branches' |
||||
|
_order = 'name' |
||||
|
|
||||
|
name = fields.Char(string='Branch', required=True, store=True) |
||||
|
company_id = fields.Many2one('res.company', required=True, string='Company') |
||||
|
street = fields.Char() |
||||
|
street2 = fields.Char() |
||||
|
zip = fields.Char() |
||||
|
city = fields.Char() |
||||
|
state_id = fields.Many2one( |
||||
|
'res.country.state', |
||||
|
string="Fed. State", domain="[('country_id', '=?', country_id)]" |
||||
|
) |
||||
|
country_id = fields.Many2one('res.country', string="Country") |
||||
|
email = fields.Char(store=True, ) |
||||
|
phone = fields.Char(store=True) |
||||
|
website = fields.Char(readonly=False) |
||||
|
|
||||
|
_sql_constraints = [ |
||||
|
('name_uniq', 'unique (name)', 'The Branch name must be unique !') |
||||
|
] |
@ -0,0 +1,25 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
############################################################################# |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# |
||||
|
# Copyright (C) 2022-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 LESSER |
||||
|
# GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. |
||||
|
# |
||||
|
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE |
||||
|
# (LGPL v3) along with this program. |
||||
|
# If not, see <http://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
############################################################################# |
||||
|
|
||||
|
from . import branch_sale_order_report |
||||
|
from . import branch_purchase_order_report |
||||
|
from . import branch_account_invoice_report |
@ -0,0 +1,40 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
############################################################################# |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# |
||||
|
# Copyright (C) 2022-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 LESSER |
||||
|
# GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. |
||||
|
# |
||||
|
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE |
||||
|
# (LGPL v3) along with this program. |
||||
|
# If not, see <http://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
############################################################################# |
||||
|
|
||||
|
from odoo import fields, models |
||||
|
|
||||
|
|
||||
|
class AccountInvoiceReport(models.Model): |
||||
|
"""inherited invoice report""" |
||||
|
_inherit = "account.invoice.report" |
||||
|
|
||||
|
branch_id = fields.Many2one('res.branch', 'Branch', readonly=True) |
||||
|
|
||||
|
def _select(self): |
||||
|
"""select""" |
||||
|
return super(AccountInvoiceReport, self)._select() +\ |
||||
|
", move.branch_id as branch_id" |
||||
|
|
||||
|
def _group_by(self): |
||||
|
"""group by""" |
||||
|
return super(AccountInvoiceReport, self)._group_by() + \ |
||||
|
", move.branch_id" |
@ -0,0 +1,40 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
############################################################################# |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# |
||||
|
# Copyright (C) 2022-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 LESSER |
||||
|
# GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. |
||||
|
# |
||||
|
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE |
||||
|
# (LGPL v3) along with this program. |
||||
|
# If not, see <http://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
############################################################################# |
||||
|
|
||||
|
from odoo import fields, models |
||||
|
|
||||
|
|
||||
|
class PurchaseReport(models.Model): |
||||
|
"""inherited purchase report""" |
||||
|
_inherit = "purchase.report" |
||||
|
|
||||
|
branch_id = fields.Many2one('res.branch', 'Branch', readonly=True) |
||||
|
|
||||
|
def _select(self): |
||||
|
"""select""" |
||||
|
return super(PurchaseReport, self)._select() + \ |
||||
|
", po.branch_id as branch_id" |
||||
|
|
||||
|
def _group_by(self): |
||||
|
"""group by""" |
||||
|
return super(PurchaseReport, self)._group_by() + \ |
||||
|
", po.branch_id" |
@ -0,0 +1,36 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
############################################################################# |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# |
||||
|
# Copyright (C) 2022-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 LESSER |
||||
|
# GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. |
||||
|
# |
||||
|
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE |
||||
|
# (LGPL v3) along with this program. |
||||
|
# If not, see <http://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
############################################################################# |
||||
|
|
||||
|
from odoo import fields, models |
||||
|
|
||||
|
|
||||
|
class SaleReport(models.Model): |
||||
|
_inherit = "sale.report" |
||||
|
|
||||
|
branch_id = fields.Many2one('res.branch', 'Branch', readonly=True) |
||||
|
|
||||
|
def _query(self, with_clause='', fields={}, groupby='', from_clause=''): |
||||
|
"""query""" |
||||
|
fields['branch_id'] = ", s.branch_id as branch_id" |
||||
|
groupby += ', s.branch_id' |
||||
|
return super(SaleReport, self)._query(with_clause, fields, groupby, |
||||
|
from_clause) |
@ -0,0 +1,152 @@ |
|||||
|
<?xml version="1.0" ?> |
||||
|
<odoo> |
||||
|
|
||||
|
<data noupdate="1"> |
||||
|
|
||||
|
<!-- Record Rules For Branch --> |
||||
|
<record id="res_branch_rule_portal" model="ir.rule"> |
||||
|
<field name="name">branch rule portal</field> |
||||
|
<field name="model_id" ref="model_res_branch"/> |
||||
|
<field eval="False" name="global"/> |
||||
|
<field name="groups" eval="[(6, 0, [ref('base.group_portal')])]"/> |
||||
|
<field name="domain_force">[('id','in', user.branch_ids.ids)]</field> |
||||
|
</record> |
||||
|
<record id="res_branch_rule_employee" model="ir.rule"> |
||||
|
<field name="name">branch rule employee</field> |
||||
|
<field name="model_id" ref="model_res_branch"/> |
||||
|
<field eval="False" name="global"/> |
||||
|
<field name="groups" eval="[(6, 0, [ref('base.group_user')])]"/> |
||||
|
<field name="domain_force">[('id','in', user.branch_ids.ids)]</field> |
||||
|
</record> |
||||
|
<record id="res_branch_rule_public" model="ir.rule"> |
||||
|
<field name="name">branch rule public</field> |
||||
|
<field name="model_id" ref="model_res_branch"/> |
||||
|
<field eval="False" name="global"/> |
||||
|
<field name="groups" eval="[(6, 0, [ref('base.group_public')])]"/> |
||||
|
<field name="domain_force">[('id','in', user.branch_ids.ids)]</field> |
||||
|
</record> |
||||
|
<record id="res_branch_rule_erp_manager" model="ir.rule"> |
||||
|
<field name="name">branch rule erp manager</field> |
||||
|
<field name="model_id" ref="model_res_branch"/> |
||||
|
<field eval="False" name="global"/> |
||||
|
<field name="groups" eval="[(6, 0, [ref('base.group_erp_manager')])]"/> |
||||
|
<field name="domain_force">[(1,'=',1)]</field> |
||||
|
</record> |
||||
|
|
||||
|
<!-- Multi - Branch Rules --> |
||||
|
|
||||
|
<record id="product_branch_rule" model="ir.rule"> |
||||
|
<field name="name" >Product multi-branch</field> |
||||
|
<field name="model_id" ref="model_product_template"/> |
||||
|
<field name="domain_force">['|',('branch_id','=',False),('branch_id', 'in', user.branch_ids.ids)]</field> |
||||
|
</record> |
||||
|
|
||||
|
<record model="ir.rule" id="sale_order_branch_rule"> |
||||
|
<field name="name">Sales Order multi-branch</field> |
||||
|
<field name="model_id" ref="model_sale_order"/> |
||||
|
<field name="domain_force">['|',('branch_id','=',False),('branch_id', 'in', user.branch_ids.ids)]</field> |
||||
|
</record> |
||||
|
|
||||
|
<record model="ir.rule" id="sale_order_line_branch_rule"> |
||||
|
<field name="name">Sales Order Line multi-branch</field> |
||||
|
<field name="model_id" ref="model_sale_order_line"/> |
||||
|
<field name="domain_force">['|',('branch_id','=',False),('branch_id', 'in', user.branch_ids.ids)]</field> |
||||
|
</record> |
||||
|
|
||||
|
<record model="ir.rule" id="purchase_order_branch_rule"> |
||||
|
<field name="name">Purchase Order multi-branch</field> |
||||
|
<field name="model_id" ref="model_purchase_order"/> |
||||
|
<field name="domain_force">['|',('branch_id','=',False),('branch_id', 'in', user.branch_ids.ids)]</field> |
||||
|
</record> |
||||
|
|
||||
|
<record model="ir.rule" id="purchase_order_line_branch_rule"> |
||||
|
<field name="name">Purchase Order Line multi-branch</field> |
||||
|
<field name="model_id" ref="model_purchase_order_line"/> |
||||
|
<field name="domain_force">['|',('branch_id','=',False),('branch_id', 'in', user.branch_ids.ids)]</field> |
||||
|
</record> |
||||
|
|
||||
|
<record id="account_branch_rule" model="ir.rule"> |
||||
|
<field name="name">Account multi-branch</field> |
||||
|
<field name="model_id" ref="model_account_account"/> |
||||
|
<field name="domain_force">['|',('branch_id','=',False),('branch_id', 'in', user.branch_ids.ids)]</field> |
||||
|
</record> |
||||
|
|
||||
|
<record id="journal_branch_rule" model="ir.rule"> |
||||
|
<field name="name">Journal multi-branch</field> |
||||
|
<field name="model_id" ref="model_account_journal"/> |
||||
|
<field name="domain_force">['|',('branch_id','=',False),('branch_id', 'in', user.branch_ids.ids)]</field> |
||||
|
</record> |
||||
|
|
||||
|
<record id="account_move_branch_rule" model="ir.rule"> |
||||
|
<field name="name">Branch Account Entry</field> |
||||
|
<field name="model_id" ref="model_account_move"/> |
||||
|
<field name="domain_force">['|',('branch_id','=',False),('branch_id', 'in', user.branch_ids.ids)]</field> |
||||
|
</record> |
||||
|
|
||||
|
<record id="account_move_line_comp_rule" model="ir.rule"> |
||||
|
<field name="name">Entry lines</field> |
||||
|
<field name="model_id" ref="model_account_move_line"/> |
||||
|
<field name="domain_force">['|',('branch_id','=',False),('branch_id', 'in', user.branch_ids.ids)]</field> |
||||
|
</record> |
||||
|
|
||||
|
<record model="ir.rule" id="account_payment_branch_rule"> |
||||
|
<field name="name">Account payment branch rule</field> |
||||
|
<field name="model_id" ref="model_account_payment"/> |
||||
|
<field name="domain_force">['|',('branch_id','=',False),('branch_id', 'in', user.branch_ids.ids)]</field> |
||||
|
</record> |
||||
|
|
||||
|
<record model="ir.rule" id="stock_picking_branch_rule"> |
||||
|
<field name="name">stock_picking multi-branch</field> |
||||
|
<field name="model_id" search="[('model','=','stock.picking')]" model="ir.model"/> |
||||
|
<field name="domain_force">['|',('branch_id','=',False),('branch_id', 'in', user.branch_ids.ids)]</field> |
||||
|
</record> |
||||
|
|
||||
|
<record model="ir.rule" id="stock_picking_type_branch_rule"> |
||||
|
<field name="name">Stock Operation Type multi-branch</field> |
||||
|
<field name="model_id" search="[('model','=','stock.picking.type')]" model="ir.model"/> |
||||
|
<field name="domain_force">['|',('branch_id','=',False),('branch_id', 'in', user.branch_ids.ids)]</field> |
||||
|
</record> |
||||
|
|
||||
|
<record model="ir.rule" id="stock_warehouse_branch_rule"> |
||||
|
<field name="name">Warehouse multi-branch</field> |
||||
|
<field name="model_id" ref="model_stock_warehouse"/> |
||||
|
<field name="domain_force">['|',('branch_id','=',False),('branch_id', 'in', user.branch_ids.ids)]</field> |
||||
|
</record> |
||||
|
|
||||
|
<record model="ir.rule" id="stock_move_branch_rule"> |
||||
|
<field name="name">stock_move multi-branch</field> |
||||
|
<field name="model_id" search="[('model','=','stock.move')]" model="ir.model"/> |
||||
|
<field name="domain_force">['|',('branch_id','=',False),('branch_id', 'in', user.branch_ids.ids)]</field> |
||||
|
</record> |
||||
|
|
||||
|
<record model="ir.rule" id="stock_move_line_branch_rule"> |
||||
|
<field name="name">stock_move_line multi-branch</field> |
||||
|
<field name="model_id" search="[('model','=','stock.move.line')]" model="ir.model"/> |
||||
|
<field name="domain_force">['|',('branch_id','=',False),('branch_id', 'in', user.branch_ids.ids)]</field> |
||||
|
</record> |
||||
|
|
||||
|
<record model="ir.rule" id="stock_valuation_layer_branch_rule"> |
||||
|
<field name="name">Stock Valuation Layer Multibranch</field> |
||||
|
<field name="model_id" search="[('model','=','stock.valuation.layer')]" model="ir.model"/> |
||||
|
<field name="domain_force">['|',('branch_id','=',False),('branch_id', 'in', user.branch_ids.ids)]</field> |
||||
|
</record> |
||||
|
|
||||
|
<record id="invoice_analysis_branch_rule" model="ir.rule"> |
||||
|
<field name="name">Invoice Analysis multi-branch</field> |
||||
|
<field name="model_id" ref="model_account_invoice_report"/> |
||||
|
<field name="domain_force">['|',('branch_id','=',False),('branch_id', 'in', user.branch_ids.ids)]</field> |
||||
|
</record> |
||||
|
|
||||
|
<record model="ir.rule" id="sale_order_report_branch_rule"> |
||||
|
<field name="name">Sales Order Analysis multi-branch</field> |
||||
|
<field name="model_id" ref="model_sale_report"/> |
||||
|
<field name="domain_force">['|',('branch_id','=',False),('branch_id', 'in', user.branch_ids.ids)]</field> |
||||
|
</record> |
||||
|
|
||||
|
<record id="purchase_order_report_branch_rule" model="ir.rule"> |
||||
|
<field name="name">Purchase Order Report multi-branch</field> |
||||
|
<field name="model_id" ref="model_purchase_report"/> |
||||
|
<field name="domain_force">['|',('branch_id','=',False),('branch_id', 'in', user.branch_ids.ids)]</field> |
||||
|
</record> |
||||
|
</data> |
||||
|
</odoo> |
|
After Width: | Height: | Size: 3.6 KiB |
After Width: | Height: | Size: 310 B |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 576 B |
After Width: | Height: | Size: 733 B |
After Width: | Height: | Size: 911 B |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 3.4 KiB |
After Width: | Height: | Size: 673 B |
After Width: | Height: | Size: 878 B |
After Width: | Height: | Size: 653 B |
After Width: | Height: | Size: 905 B |
After Width: | Height: | Size: 839 B |
After Width: | Height: | Size: 427 B |
After Width: | Height: | Size: 627 B |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 988 B |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 58 KiB |
After Width: | Height: | Size: 58 KiB |
After Width: | Height: | Size: 58 KiB |
After Width: | Height: | Size: 58 KiB |
After Width: | Height: | Size: 56 KiB |
After Width: | Height: | Size: 58 KiB |
After Width: | Height: | Size: 96 KiB |
After Width: | Height: | Size: 72 KiB |
After Width: | Height: | Size: 137 KiB |
After Width: | Height: | Size: 149 KiB |
After Width: | Height: | Size: 160 KiB |
After Width: | Height: | Size: 98 KiB |
After Width: | Height: | Size: 85 KiB |
After Width: | Height: | Size: 95 KiB |
After Width: | Height: | Size: 113 KiB |
After Width: | Height: | Size: 136 KiB |
After Width: | Height: | Size: 124 KiB |
After Width: | Height: | Size: 132 KiB |
After Width: | Height: | Size: 144 KiB |
After Width: | Height: | Size: 140 KiB |
After Width: | Height: | Size: 137 KiB |
After Width: | Height: | Size: 51 KiB |
After Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 22 KiB |
After Width: | Height: | Size: 51 KiB |
After Width: | Height: | Size: 52 KiB |
After Width: | Height: | Size: 53 KiB |
After Width: | Height: | Size: 52 KiB |
After Width: | Height: | Size: 54 KiB |
@ -0,0 +1,902 @@ |
|||||
|
<div class="container" style="padding: 1rem !important; margin-bottom: 1rem !important;"> |
||||
|
<div class="row"> |
||||
|
<div class="col-sm-12 col-md-12 col-lg-12 d-flex justify-content-between" |
||||
|
style="border-bottom: 1px solid #d5d5d5;"> |
||||
|
<div class="my-3"> |
||||
|
<img src="./assets/icons/logo.png" style="width: auto !important; height: 40px !important;"> |
||||
|
</div> |
||||
|
<div class="my-3 d-flex align-items-center"> |
||||
|
<div |
||||
|
style="background-color: #7C7BAD !important; color: #fff !important; font-weight: 600 !important; padding: 5px 15px 8px !important; margin: 0 5px !important;"> |
||||
|
<i class="fa fa-check mr-1"></i>Community |
||||
|
</div> |
||||
|
<div |
||||
|
style="background-color: #875A7B !important; color: #fff !important; font-weight: 600 !important; padding: 5px 15px 8px !important; margin: 0 5px !important;"> |
||||
|
<i class="fa fa-check mr-1"></i>Enterprise |
||||
|
</div> |
||||
|
|
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
<div class="container" style="padding: 0rem 1.5rem 4rem !important"> |
||||
|
<div class="row" style="height: 900px !important;"> |
||||
|
<div class="col-sm-12 col-md-12 col-lg-12" |
||||
|
style="padding: 4rem 1rem !important; background-color: #714B67 !important; height: 600px !important; border-radius: 20px !important;"> |
||||
|
<h1 |
||||
|
style="font-family: 'Montserrat', sans-serif !important; font-weight: 600 !important; color: #FFFFFF !important; font-size: 3.5rem !important; text-align: center !important;"> |
||||
|
Multi Branch Operations</h1> |
||||
|
<p |
||||
|
style="font-family: 'Montserrat', sans-serif !important; font-weight: 300 !important; color: #FFFFFF !important; font-size: 1.4rem !important; text-align: center !important;"> |
||||
|
Multiple Branch Unit Operation Setup for All |
||||
|
Modules In Odoo |
||||
|
</p> |
||||
|
<img src="./assets/screenshots/hero.png" class="img-responsive" width="100%" height="auto" /> |
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
<div class="row"> |
||||
|
<div class="col-md-12" style="border-bottom: 1px solid #d5d5d5 !important; margin-bottom: 2rem !important"> |
||||
|
<h2 |
||||
|
style="font-family: 'Montserrat', sans-serif !important; font-weight: 600 !important; color: #714B67 !important; font-size: 1.5rem !important;"> |
||||
|
<i class="fa fa-compass mr-2"></i>Explore this module |
||||
|
</h2> |
||||
|
</div> |
||||
|
<div class="col-md-6"> |
||||
|
<a href="#overview" style="text-decoration: none !important;"> |
||||
|
<div class="row" |
||||
|
style="background-color: #f5f2f5 !important; border-radius: 10px !important; margin: 1rem !important; padding: 1.5em !important; height: 100px !important;"> |
||||
|
<div class="col-8"> |
||||
|
<h3 |
||||
|
style="font-family: 'Montserrat', sans-serif !important; font-weight: 600 !important; color: #714B67 !important; font-size: 1.2rem !important;"> |
||||
|
Overview</h3> |
||||
|
<p |
||||
|
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #714B67 !important; font-size: 0.9rem !important;"> |
||||
|
Learn more about this module</p> |
||||
|
</div> |
||||
|
<div class="col-4 text-right d-flex justify-content-end align-items-center"> |
||||
|
<i class="fa fa-chevron-right" style="color: #714B67 !important;"></i> |
||||
|
</div> |
||||
|
</div> |
||||
|
</a> |
||||
|
</div> |
||||
|
|
||||
|
<div class="col-md-6"> |
||||
|
<a href="#features" style="text-decoration: none !important;"> |
||||
|
<div class="row" |
||||
|
style="background-color: #f5f2f5 !important; border-radius: 10px !important; margin: 1rem !important; padding: 1.5em !important; height: 100px !important;"> |
||||
|
<div class="col-8"> |
||||
|
<h3 |
||||
|
style="font-family: 'Montserrat', sans-serif !important; font-weight: 600 !important; color: #714B67 !important; font-size: 1.2rem !important;"> |
||||
|
Features</h3> |
||||
|
<p |
||||
|
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #714B67 !important; font-size: 0.9rem !important;"> |
||||
|
View features of this module</p> |
||||
|
</div> |
||||
|
<div class="col-4 text-right d-flex justify-content-end align-items-center"> |
||||
|
<i class="fa fa-chevron-right" style="color: #714B67 !important;"></i> |
||||
|
</div> |
||||
|
</div> |
||||
|
</a> |
||||
|
</div> |
||||
|
<div class="col-md-6"> |
||||
|
<a href="#screenshots" style="text-decoration: none !important;"> |
||||
|
<div class="row" |
||||
|
style="background-color: #f5f2f5 !important; border-radius: 10px !important; margin: 1rem !important; padding: 1.5em !important; height: 100px !important;"> |
||||
|
<div class="col-8"> |
||||
|
<h3 |
||||
|
style="font-family: 'Montserrat', sans-serif !important; font-weight: 600 !important; color: #714B67 !important; font-size: 1.2rem !important;"> |
||||
|
Screenshots</h3> |
||||
|
<p |
||||
|
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #714B67 !important; font-size: 0.9rem !important;"> |
||||
|
See key screenshots of this module</p> |
||||
|
</div> |
||||
|
<div class="col-4 text-right d-flex justify-content-end align-items-center"> |
||||
|
<i class="fa fa-chevron-right" style="color: #714B67 !important;"></i> |
||||
|
</div> |
||||
|
</div> |
||||
|
</a> |
||||
|
</div> |
||||
|
|
||||
|
</div> |
||||
|
<div class="row" id="overview"> |
||||
|
<div class="col-md-12" style="border-bottom: 1px solid #d5d5d5 !important; margin: 2rem 0 !important"> |
||||
|
<h2 |
||||
|
style="font-family: 'Montserrat', sans-serif !important; font-weight: 600 !important; color: #714B67 !important; font-size: 1.5rem !important;"> |
||||
|
<i class="fa fa-pie-chart mr-2"></i>Overview |
||||
|
</h2> |
||||
|
</div> |
||||
|
|
||||
|
<div class="col-mg-12 pl-3"> |
||||
|
<p |
||||
|
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important; line-height: 30px !important;"> |
||||
|
Multi Branch module helps to manage the operations of multiple branches of a single company. |
||||
|
You can manage multiple branches and all the operations of different branches of in the Inventory, |
||||
|
Accounting, Sales and Purchase applications by installing this single module. |
||||
|
After installing the module, the administrator can create multiple branches for the company by providing the details from |
||||
|
Settings -> Users and Companies -> Branches. Allowed branches and default branch can be set for each user from |
||||
|
Settings -> Users and Companies -> Users. Once it is configured, the user can access the all branches which are allowed for the particular user. |
||||
|
</p> |
||||
|
|
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
<div class="row" id="features"> |
||||
|
<div class="col-md-12" style="border-bottom: 1px solid #d5d5d5 !important; margin: 2rem 0 !important"> |
||||
|
<h2 |
||||
|
style="font-family: 'Montserrat', sans-serif !important; font-weight: 600 !important; color: #714B67 !important; font-size: 1.5rem !important;"> |
||||
|
<i class="fa fa-star mr-2"></i>Features |
||||
|
</h2> |
||||
|
</div> |
||||
|
|
||||
|
<div class="col-md-6 pl-3 pt-3 d-flex"> |
||||
|
<div> |
||||
|
<img src="assets/icons/check.png"> |
||||
|
</div> |
||||
|
<div> |
||||
|
<h4 |
||||
|
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;"> |
||||
|
|
||||
|
Create Branches for the Company.</h4> |
||||
|
|
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
<div class="col-md-6 pl-3 pt-3 d-flex"> |
||||
|
<div> |
||||
|
<img src="assets/icons/check.png"> |
||||
|
</div> |
||||
|
<div> |
||||
|
<h4 |
||||
|
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;"> |
||||
|
|
||||
|
Branch for User.</h4> |
||||
|
|
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
<div class="col-md-6 pl-3 pt-3 d-flex"> |
||||
|
<div> |
||||
|
<img src="assets/icons/check.png"> |
||||
|
</div> |
||||
|
<div> |
||||
|
<h4 |
||||
|
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;"> |
||||
|
|
||||
|
Branch on Product.</h4> |
||||
|
|
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
<div class="col-md-6 pl-3 pt-3 d-flex"> |
||||
|
<div> |
||||
|
<img src="assets/icons/check.png"> |
||||
|
</div> |
||||
|
<div> |
||||
|
<h4 |
||||
|
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;"> |
||||
|
|
||||
|
Branch on Partner.</h4> |
||||
|
|
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
<div class="col-md-6 pl-3 pt-3 d-flex"> |
||||
|
<div> |
||||
|
<img src="assets/icons/check.png"> |
||||
|
</div> |
||||
|
<div> |
||||
|
<h4 |
||||
|
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;"> |
||||
|
|
||||
|
Branch on Journal.</h4> |
||||
|
|
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
<div class="col-md-6 pl-3 pt-3 d-flex"> |
||||
|
<div> |
||||
|
<img src="assets/icons/check.png"> |
||||
|
</div> |
||||
|
<div> |
||||
|
<h4 |
||||
|
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;"> |
||||
|
|
||||
|
Branch on Account.</h4> |
||||
|
|
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
<div class="col-md-6 pl-3 pt-3 d-flex"> |
||||
|
<div> |
||||
|
<img src="assets/icons/check.png"> |
||||
|
</div> |
||||
|
<div> |
||||
|
<h4 |
||||
|
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;"> |
||||
|
|
||||
|
Branch on Customer Vendor Payments.</h4> |
||||
|
|
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
<div class="col-md-6 pl-3 pt-3 d-flex"> |
||||
|
<div> |
||||
|
<img src="assets/icons/check.png"> |
||||
|
</div> |
||||
|
<div> |
||||
|
<h4 |
||||
|
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;"> |
||||
|
|
||||
|
Branch on Customer Invoice.</h4> |
||||
|
|
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
<div class="col-md-6 pl-3 pt-3 d-flex"> |
||||
|
<div> |
||||
|
<img src="assets/icons/check.png"> |
||||
|
</div> |
||||
|
<div> |
||||
|
<h4 |
||||
|
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;"> |
||||
|
|
||||
|
Branch on Vendor Bill.</h4> |
||||
|
|
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
<div class="col-md-6 pl-3 pt-3 d-flex"> |
||||
|
<div> |
||||
|
<img src="assets/icons/check.png"> |
||||
|
</div> |
||||
|
<div> |
||||
|
<h4 |
||||
|
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;"> |
||||
|
|
||||
|
Branch on Warehouse.</h4> |
||||
|
|
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
<div class="col-md-6 pl-3 pt-3 d-flex"> |
||||
|
<div> |
||||
|
<img src="assets/icons/check.png"> |
||||
|
</div> |
||||
|
<div> |
||||
|
<h4 |
||||
|
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;"> |
||||
|
|
||||
|
Branch on Operation Types.</h4> |
||||
|
|
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
<div class="col-md-6 pl-3 pt-3 d-flex"> |
||||
|
<div> |
||||
|
<img src="assets/icons/check.png"> |
||||
|
</div> |
||||
|
<div> |
||||
|
<h4 |
||||
|
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;"> |
||||
|
|
||||
|
Branch on transfer.</h4> |
||||
|
|
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
<div class="col-md-6 pl-3 pt-3 d-flex"> |
||||
|
<div> |
||||
|
<img src="assets/icons/check.png"> |
||||
|
</div> |
||||
|
<div> |
||||
|
<h4 |
||||
|
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;"> |
||||
|
|
||||
|
Branch on Sales flow.</h4> |
||||
|
|
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
<div class="col-md-6 pl-3 pt-3 d-flex"> |
||||
|
<div> |
||||
|
<img src="assets/icons/check.png"> |
||||
|
</div> |
||||
|
<div> |
||||
|
<h4 |
||||
|
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;"> |
||||
|
|
||||
|
Branch on Purchase flow.</h4> |
||||
|
|
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
<div class="col-md-6 pl-3 pt-3 d-flex"> |
||||
|
<div> |
||||
|
<img src="assets/icons/check.png"> |
||||
|
</div> |
||||
|
<div> |
||||
|
<h4 |
||||
|
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;"> |
||||
|
|
||||
|
Branch on Reports.</h4> |
||||
|
|
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
</div> |
||||
|
|
||||
|
<div class="row" id="screenshots"> |
||||
|
<div class="col-md-12" style="border-bottom: 1px solid #d5d5d5 !important; margin: 2rem 0 !important"> |
||||
|
<h2 |
||||
|
style="font-family: 'Montserrat', sans-serif !important; font-weight: 600 !important; color: #714B67 !important; font-size: 1.5rem !important;"> |
||||
|
<i class="fa fa-image mr-2"></i>Screenshots |
||||
|
</h2> |
||||
|
</div> |
||||
|
|
||||
|
<div class="col-lg-12 my-2"> |
||||
|
<h4 class="my-2" |
||||
|
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;"> |
||||
|
Branch Creation</h4> |
||||
|
<p |
||||
|
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;"> |
||||
|
Administrator can create Branches for the |
||||
|
company from Settings -> Users & Companies -> Branches -> Create |
||||
|
</p> |
||||
|
<img src="assets/screenshots/mb01.png" class="img-responsive img-thumbnail border" width="100%" |
||||
|
height="auto" /> |
||||
|
</div> |
||||
|
|
||||
|
<div class="col-lg-12 my-2"> |
||||
|
<h4 class="my-2" |
||||
|
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;"> |
||||
|
Allowed & Default Branch</h4> |
||||
|
<p |
||||
|
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;"> |
||||
|
Allowed branches and default branch can be set for each user. |
||||
|
The showing Branches will be based on the allowed Companies |
||||
|
for the particular user |
||||
|
</p> |
||||
|
<img src="assets/screenshots/mb02.png" class="img-responsive img-thumbnail border" width="100%" |
||||
|
height="auto" /> |
||||
|
</div> |
||||
|
|
||||
|
<div class="col-lg-12 my-2"> |
||||
|
<h4 class="my-2" |
||||
|
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;"> |
||||
|
Product</h4> |
||||
|
<p |
||||
|
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;"> |
||||
|
Branch can be set for products. |
||||
|
If a product is shared between branches then it is suggested to |
||||
|
keep branch field as empty |
||||
|
</p> |
||||
|
<img src="assets/screenshots/mb03.png" class="img-responsive img-thumbnail border" width="100%" |
||||
|
height="auto" /> |
||||
|
</div> |
||||
|
|
||||
|
<div class="col-lg-12 my-2"> |
||||
|
<h4 class="my-2" |
||||
|
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;"> |
||||
|
Partners</h4> |
||||
|
<p |
||||
|
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;"> |
||||
|
Branch can be set for partners |
||||
|
</p> |
||||
|
<img src="assets/screenshots/mb04.png" class="img-responsive img-thumbnail border" width="100%" |
||||
|
height="auto" /> |
||||
|
</div> |
||||
|
|
||||
|
<div class="col-lg-12 my-2"> |
||||
|
<h4 class="my-2" |
||||
|
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;"> |
||||
|
Journal</h4> |
||||
|
<p |
||||
|
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;"> |
||||
|
Branch for Journals |
||||
|
</p> |
||||
|
<img src="assets/screenshots/mb05.png" class="img-responsive img-thumbnail border" width="100%" |
||||
|
height="auto" /> |
||||
|
</div> |
||||
|
|
||||
|
<div class="col-lg-12 my-2"> |
||||
|
<h4 class="my-2" |
||||
|
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;"> |
||||
|
Chart of Accounts</h4> |
||||
|
<p |
||||
|
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;"> |
||||
|
Branch for Chart of Accounts |
||||
|
</p> |
||||
|
<img src="assets/screenshots/mb06.png" class="img-responsive img-thumbnail border" width="100%" |
||||
|
height="auto" /> |
||||
|
</div> |
||||
|
|
||||
|
<div class="col-lg-12 my-2"> |
||||
|
<h4 class="my-2" |
||||
|
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;"> |
||||
|
Warehouse</h4> |
||||
|
<p |
||||
|
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;"> |
||||
|
Branch can be set for Warehouse |
||||
|
</p> |
||||
|
<img src="assets/screenshots/mb07.png" class="img-responsive img-thumbnail border" width="100%" |
||||
|
height="auto" /> |
||||
|
</div> |
||||
|
|
||||
|
<div class="col-lg-12 my-2"> |
||||
|
<h4 class="my-2" |
||||
|
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;"> |
||||
|
Operation Types</h4> |
||||
|
<p |
||||
|
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;"> |
||||
|
When a Warehouse is created the corresponding operation types for the |
||||
|
Warehouse will be automatically created.If the particular Warehouse |
||||
|
have a Branch, then the same Branch will be set for the operation |
||||
|
types too. |
||||
|
</p> |
||||
|
<img src="assets/screenshots/mb08.png" class="img-responsive img-thumbnail border" width="100%" |
||||
|
height="auto" /> |
||||
|
</div> |
||||
|
|
||||
|
<div class="col-lg-12 my-2"> |
||||
|
<h4 class="my-2" |
||||
|
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;"> |
||||
|
Purchase Order</h4> |
||||
|
<p |
||||
|
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;"> |
||||
|
For the newly created PO branch will be set based on the user. |
||||
|
</p> |
||||
|
<img src="assets/screenshots/mb09.png" class="img-responsive img-thumbnail border" width="100%" |
||||
|
height="auto" /> |
||||
|
</div> |
||||
|
|
||||
|
<div class="col-lg-12 my-2"> |
||||
|
<h4 class="my-2" |
||||
|
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;"> |
||||
|
Receipt</h4> |
||||
|
<p |
||||
|
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;"> |
||||
|
The receipt will be created once PO is confirmed.Here Destination Location and Branch will be set based on the Purchase Order Branch. |
||||
|
|
||||
|
</p> |
||||
|
<img src="assets/screenshots/mb10.png" class="img-responsive img-thumbnail border" width="100%" |
||||
|
height="auto" /> |
||||
|
</div> |
||||
|
|
||||
|
<div class="col-lg-12 my-2"> |
||||
|
<h4 class="my-2" |
||||
|
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;"> |
||||
|
Bill</h4> |
||||
|
<p |
||||
|
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;"> |
||||
|
After validating the Receipt Vendor Bill can be created from the PO.For the created Bill Branch will be set as the branch selected for the PO |
||||
|
and Journal will be set accordingly. |
||||
|
|
||||
|
</p> |
||||
|
<img src="assets/screenshots/mb11.png" class="img-responsive img-thumbnail border" width="100%" |
||||
|
height="auto" /> |
||||
|
</div> |
||||
|
|
||||
|
<div class="col-lg-12 my-2"> |
||||
|
<h4 class="my-2" |
||||
|
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;"> |
||||
|
Sale Order</h4> |
||||
|
<p |
||||
|
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;"> |
||||
|
On creating a new quotation/sale order the default branch set for |
||||
|
the user is set as the branch for the same if only one branch is allowed for the user.The warehouse used will |
||||
|
be the warehouse of the same branch. |
||||
|
</p> |
||||
|
<img src="assets/screenshots/mb12.png" class="img-responsive img-thumbnail border" width="100%" |
||||
|
height="auto" /> |
||||
|
</div> |
||||
|
|
||||
|
<div class="col-lg-12 my-2"> |
||||
|
<h4 class="my-2" |
||||
|
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;"> |
||||
|
Delivery Order</h4> |
||||
|
<p |
||||
|
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;"> |
||||
|
On confirming a sale order the corresponding delivery order will be |
||||
|
created.The branch selected for the sale order will be populated as |
||||
|
the branch for the delivery order.Also the source location is |
||||
|
set accordingly. |
||||
|
</p> |
||||
|
<img src="assets/screenshots/mb13.png" class="img-responsive img-thumbnail border" width="100%" |
||||
|
height="auto" /> |
||||
|
</div> |
||||
|
|
||||
|
<div class="col-lg-12 my-2"> |
||||
|
<h4 class="my-2" |
||||
|
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;"> |
||||
|
Invoice</h4> |
||||
|
<p |
||||
|
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;"> |
||||
|
For the invoice created for the sale order the branch will be set |
||||
|
based on the sale order.Here the journals are also set |
||||
|
based on the selected branch.If there is no available sales journal, |
||||
|
then the user can't create the invoice |
||||
|
</p> |
||||
|
<img src="assets/screenshots/mb14.png" class="img-responsive img-thumbnail border" width="100%" |
||||
|
height="auto" /> |
||||
|
</div> |
||||
|
|
||||
|
</div> |
||||
|
|
||||
|
|
||||
|
<!-- SUGGESTED PRODUCTS --> |
||||
|
<div class="row"> |
||||
|
<div class="col-lg-12 d-flex flex-column justify-content-center" |
||||
|
style="text-align: center; padding: 2.5rem 1rem !important;"> |
||||
|
<h2 style="color: #212529 !important;">Suggested Products</h2> |
||||
|
<hr |
||||
|
style="border: 3px solid #714B67 !important; background-color: #714B67 !important; width: 80px !important; margin-bottom: 2rem !important;" /> |
||||
|
|
||||
|
<div id="demo1" class="row carousel slide" data-ride="carousel"> |
||||
|
<!-- The slideshow --> |
||||
|
<div class="carousel-inner"> |
||||
|
<div class="carousel-item active" style="min-height:0px"> |
||||
|
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16" style="float:left"> |
||||
|
<a href="https://apps.odoo.com/apps/modules/14.0/pos_order_types/" target="_blank"> |
||||
|
<div style="border-radius:10px"> |
||||
|
<img class="img img-responsive center-block" |
||||
|
style="border-top-left-radius:10px; border-top-right-radius:10px" |
||||
|
src="./assets/modules/1.png"> |
||||
|
</div> |
||||
|
</a> |
||||
|
</div> |
||||
|
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16" style="float:left"> |
||||
|
<a href="https://apps.odoo.com/apps/modules/14.0/pos_product_addons/" target="_blank"> |
||||
|
<div style="border-radius:10px"> |
||||
|
<img class="img img-responsive center-block" |
||||
|
style="border-top-left-radius:10px; border-top-right-radius:10px" |
||||
|
src="./assets/modules/2.png"> |
||||
|
</div> |
||||
|
</a> |
||||
|
</div> |
||||
|
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16" style="float:left"> |
||||
|
<a href="https://apps.odoo.com/apps/modules/14.0/dashboard_pos/" target="_blank"> |
||||
|
<div style="border-radius:10px"> |
||||
|
<img class="img img-responsive center-block" |
||||
|
style="border-top-left-radius:10px; border-top-right-radius:10px" |
||||
|
src="./assets/modules/3.png"> |
||||
|
</div> |
||||
|
</a> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="carousel-item" style="min-height:0px"> |
||||
|
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16" style="float:left"> |
||||
|
<a href="https://apps.odoo.com/apps/modules/14.0/product_return_pos/" target="_blank"> |
||||
|
<div style="border-radius:10px"> |
||||
|
<img class="img img-responsive center-block" |
||||
|
style="border-top-left-radius:10px; border-top-right-radius:10px" |
||||
|
src="./assets/modules/4.png"> |
||||
|
</div> |
||||
|
</a> |
||||
|
</div> |
||||
|
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16" style="float:left"> |
||||
|
<a href="https://apps.odoo.com/apps/modules/14.0/point_of_sale_logo" target="_blank"> |
||||
|
<div style="border-radius:10px"> |
||||
|
<img class="img img-responsive center-block" |
||||
|
style="border-top-left-radius:10px; border-top-right-radius:10px" |
||||
|
src="./assets/modules/5.png"> |
||||
|
</div> |
||||
|
</a> |
||||
|
</div> |
||||
|
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16" style="float:left"> |
||||
|
<a href="https://apps.odoo.com/apps/modules/14.0/invoice_format_editor/" target="_blank"> |
||||
|
<div style="border-radius:10px"> |
||||
|
<img class="img img-responsive center-block" |
||||
|
style="border-top-left-radius:10px; border-top-right-radius:10px" |
||||
|
src="./assets/modules/6.png"> |
||||
|
</div> |
||||
|
</a> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<!-- Left and right controls --> |
||||
|
<a class="carousel-control-prev" href="#demo1" data-slide="prev" |
||||
|
style="left:-25px;width: 35px;color: #000;"> <span class="carousel-control-prev-icon"><i |
||||
|
class="fa fa-chevron-left" style="font-size:24px"></i></span> </a> <a |
||||
|
class="carousel-control-next" href="#demo1" data-slide="next" |
||||
|
style="right:-25px;width: 35px;color: #000;"> |
||||
|
<span class="carousel-control-next-icon"><i class="fa fa-chevron-right" |
||||
|
style="font-size:24px"></i></span> |
||||
|
</a> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<!-- END OF SUGGESTED PRODUCTS --> |
||||
|
|
||||
|
<!-- OUR SERVICES --> |
||||
|
<section class="container" style="margin-top: 6rem !important;"> |
||||
|
<div class="row"> |
||||
|
<div class="col-lg-12 d-flex flex-column justify-content-center align-items-center"> |
||||
|
<h2 style="color: #212529 !important;">Our Services</h2> |
||||
|
<hr |
||||
|
style="border: 3px solid #714B67 !important; background-color: #714B67 !important; width: 80px !important; margin-bottom: 2rem !important;" /> |
||||
|
</div> |
||||
|
|
||||
|
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4"> |
||||
|
<div class="d-flex justify-content-center align-items-center mx-3 my-3" |
||||
|
style="background-color: #1dd1a1 !important; border-radius: 15px !important; height: 80px; width: 80px;"> |
||||
|
<img src="assets/icons/cogs.png" class="img-responsive" height="48px" width="48px"> |
||||
|
</div> |
||||
|
<h6 class="text-center" style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;"> |
||||
|
Odoo |
||||
|
Customization</h6> |
||||
|
</div> |
||||
|
|
||||
|
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4"> |
||||
|
<div class="d-flex justify-content-center align-items-center mx-3 my-3" |
||||
|
style="background-color: #ff6b6b !important; border-radius: 15px !important; height: 80px; width: 80px;"> |
||||
|
<img src="assets/icons/wrench.png" class="img-responsive" height="48px" width="48px"> |
||||
|
</div> |
||||
|
<h6 class="text-center" style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;"> |
||||
|
Odoo |
||||
|
Implementation</h6> |
||||
|
</div> |
||||
|
|
||||
|
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4"> |
||||
|
<div class="d-flex justify-content-center align-items-center mx-3 my-3" |
||||
|
style="background-color: #6462CD !important; border-radius: 15px !important; height: 80px; width: 80px;"> |
||||
|
<img src="assets/icons/lifebuoy.png" class="img-responsive" height="48px" width="48px"> |
||||
|
</div> |
||||
|
<h6 class="text-center" style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;"> |
||||
|
Odoo |
||||
|
Support</h6> |
||||
|
</div> |
||||
|
|
||||
|
|
||||
|
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4"> |
||||
|
<div class="d-flex justify-content-center align-items-center mx-3 my-3" |
||||
|
style="background-color: #ffa801 !important; border-radius: 15px !important; height: 80px; width: 80px;"> |
||||
|
<img src="assets/icons/user.png" class="img-responsive" height="48px" width="48px"> |
||||
|
</div> |
||||
|
<h6 class="text-center" style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;"> |
||||
|
Hire |
||||
|
Odoo |
||||
|
Developer</h6> |
||||
|
</div> |
||||
|
|
||||
|
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4"> |
||||
|
<div class="d-flex justify-content-center align-items-center mx-3 my-3" |
||||
|
style="background-color: #54a0ff !important; border-radius: 15px !important; height: 80px; width: 80px;"> |
||||
|
<img src="assets/icons/puzzle.png" class="img-responsive" height="48px" width="48px"> |
||||
|
</div> |
||||
|
<h6 class="text-center" style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;"> |
||||
|
Odoo |
||||
|
Integration</h6> |
||||
|
</div> |
||||
|
|
||||
|
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4"> |
||||
|
<div class="d-flex justify-content-center align-items-center mx-3 my-3" |
||||
|
style="background-color: #6d7680 !important; border-radius: 15px !important; height: 80px; width: 80px;"> |
||||
|
<img src="assets/icons/update.png" class="img-responsive" height="48px" width="48px"> |
||||
|
</div> |
||||
|
<h6 class="text-center" style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;"> |
||||
|
Odoo |
||||
|
Migration</h6> |
||||
|
</div> |
||||
|
|
||||
|
|
||||
|
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4"> |
||||
|
<div class="d-flex justify-content-center align-items-center mx-3 my-3" |
||||
|
style="background-color: #786fa6 !important; border-radius: 15px !important; height: 80px; width: 80px;"> |
||||
|
<img src="assets/icons/consultation.png" class="img-responsive" height="48px" width="48px"> |
||||
|
</div> |
||||
|
<h6 class="text-center" style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;"> |
||||
|
Odoo |
||||
|
Consultancy</h6> |
||||
|
</div> |
||||
|
|
||||
|
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4"> |
||||
|
<div class="d-flex justify-content-center align-items-center mx-3 my-3" |
||||
|
style="background-color: #f8a5c2 !important; border-radius: 15px !important; height: 80px; width: 80px;"> |
||||
|
<img src="assets/icons/training.png" class="img-responsive" height="48px" width="48px"> |
||||
|
</div> |
||||
|
<h6 class="text-center" style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;"> |
||||
|
Odoo |
||||
|
Implementation</h6> |
||||
|
</div> |
||||
|
|
||||
|
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4"> |
||||
|
<div class="d-flex justify-content-center align-items-center mx-3 my-3" |
||||
|
style="background-color: #e6be26 !important; border-radius: 15px !important; height: 80px; width: 80px;"> |
||||
|
<img src="assets/icons/license.png" class="img-responsive" height="48px" width="48px"> |
||||
|
</div> |
||||
|
<h6 class="text-center" style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;"> |
||||
|
Odoo |
||||
|
Licensing Consultancy</h6> |
||||
|
</div> |
||||
|
</div> |
||||
|
</section> |
||||
|
<!-- END OF END OF OUR SERVICES --> |
||||
|
|
||||
|
<!-- OUR INDUSTRIES --> |
||||
|
<section class="container" style="margin-top: 6rem !important;"> |
||||
|
<div class="row"> |
||||
|
<div class="col-lg-12 d-flex flex-column justify-content-center align-items-center"> |
||||
|
<h2 style="color: #212529 !important;">Our Industries</h2> |
||||
|
<hr |
||||
|
style="border: 3px solid #714B67 !important; background-color: #714B67 !important; width: 80px !important; margin-bottom: 2rem !important;" /> |
||||
|
</div> |
||||
|
|
||||
|
<div class="col-lg-3"> |
||||
|
<div class="my-4 d-flex flex-column justify-content-center" |
||||
|
style="background-color: #f6f8f9 !important; border-radius: 10px; padding: 2rem !important; height: 250px !important;"> |
||||
|
<img src="./assets/icons/trading-black.png" class="img-responsive mb-3" height="48px" width="48px"> |
||||
|
<h5 |
||||
|
style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;"> |
||||
|
Trading |
||||
|
</h5> |
||||
|
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;"> |
||||
|
Easily procure |
||||
|
and |
||||
|
sell your products</p> |
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
<div class="col-lg-3"> |
||||
|
<div class="my-4 d-flex flex-column justify-content-center" |
||||
|
style="background-color: #f6f8f9 !important; border-radius: 10px; padding: 2rem !important; height: 250px !important;"> |
||||
|
<img src="./assets/icons/pos-black.png" class="img-responsive mb-3" height="48px" width="48px"> |
||||
|
<h5 |
||||
|
style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;"> |
||||
|
POS |
||||
|
</h5> |
||||
|
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;"> |
||||
|
Easy |
||||
|
configuration |
||||
|
and convivial experience</p> |
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
<div class="col-lg-3"> |
||||
|
<div class="my-4 d-flex flex-column justify-content-center" |
||||
|
style="background-color: #f6f8f9 !important; border-radius: 10px; padding: 2rem !important; height: 250px !important;"> |
||||
|
<img src="./assets/icons/education-black.png" class="img-responsive mb-3" height="48px" |
||||
|
width="48px"> |
||||
|
<h5 |
||||
|
style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;"> |
||||
|
Education |
||||
|
</h5> |
||||
|
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;"> |
||||
|
A platform for |
||||
|
educational management</p> |
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
<div class="col-lg-3"> |
||||
|
<div class="my-4 d-flex flex-column justify-content-center" |
||||
|
style="background-color: #f6f8f9 !important; border-radius: 10px; padding: 2rem !important; height: 250px !important;"> |
||||
|
<img src="./assets/icons/manufacturing-black.png" class="img-responsive mb-3" height="48px" |
||||
|
width="48px"> |
||||
|
<h5 |
||||
|
style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;"> |
||||
|
Manufacturing |
||||
|
</h5> |
||||
|
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;"> |
||||
|
Plan, track and |
||||
|
schedule your operations</p> |
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
<div class="col-lg-3"> |
||||
|
<div class="my-4 d-flex flex-column justify-content-center" |
||||
|
style="background-color: #f6f8f9 !important; border-radius: 10px; padding: 2rem !important; height: 250px !important;"> |
||||
|
<img src="./assets/icons/ecom-black.png" class="img-responsive mb-3" height="48px" width="48px"> |
||||
|
<h5 |
||||
|
style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;"> |
||||
|
E-commerce & Website |
||||
|
</h5> |
||||
|
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;"> |
||||
|
Mobile |
||||
|
friendly, |
||||
|
awe-inspiring product pages</p> |
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
<div class="col-lg-3"> |
||||
|
<div class="my-4 d-flex flex-column justify-content-center" |
||||
|
style="background-color: #f6f8f9 !important; border-radius: 10px; padding: 2rem !important; height: 250px !important;"> |
||||
|
<img src="./assets/icons/service-black.png" class="img-responsive mb-3" height="48px" width="48px"> |
||||
|
<h5 |
||||
|
style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;"> |
||||
|
Service Management |
||||
|
</h5> |
||||
|
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;"> |
||||
|
Keep track of |
||||
|
services and invoice</p> |
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
<div class="col-lg-3"> |
||||
|
<div class="my-4 d-flex flex-column justify-content-center" |
||||
|
style="background-color: #f6f8f9 !important; border-radius: 10px; padding: 2rem !important; height: 250px !important;"> |
||||
|
<img src="./assets/icons/restaurant-black.png" class="img-responsive mb-3" height="48px" |
||||
|
width="48px"> |
||||
|
<h5 |
||||
|
style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;"> |
||||
|
Restaurant |
||||
|
</h5> |
||||
|
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;"> |
||||
|
Run your bar or |
||||
|
restaurant methodically</p> |
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
<div class="col-lg-3"> |
||||
|
<div class="my-4 d-flex flex-column justify-content-center" |
||||
|
style="background-color: #f6f8f9 !important; border-radius: 10px; padding: 2rem !important; height: 250px !important;"> |
||||
|
<img src="./assets/icons/hotel-black.png" class="img-responsive mb-3" height="48px" width="48px"> |
||||
|
<h5 |
||||
|
style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;"> |
||||
|
Hotel Management |
||||
|
</h5> |
||||
|
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;"> |
||||
|
An |
||||
|
all-inclusive |
||||
|
hotel management application</p> |
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
</div> |
||||
|
</section> |
||||
|
|
||||
|
<!-- END OF END OF OUR INDUSTRIES --> |
||||
|
|
||||
|
<!-- FOOTER --> |
||||
|
<!-- Footer Section --> |
||||
|
<section class="container" style="margin: 5rem auto 2rem;"> |
||||
|
<div class="row" style="max-width:1540px;"> |
||||
|
<div class="col-lg-12 d-flex flex-column justify-content-center align-items-center"> |
||||
|
<h2 style="color: #212529 !important;">Need Help?</h2> |
||||
|
<hr |
||||
|
style="border: 3px solid #714B67 !important; background-color: #714B67 !important; width: 80px !important; margin-bottom: 2rem !important;" /> |
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
<!-- Contact Cards --> |
||||
|
<div class="row d-flex justify-content-center align-items-center" |
||||
|
style="max-width:1540px; margin: 0 auto 2rem auto;"> |
||||
|
|
||||
|
<div class="col-lg-12" style="padding: 0rem 3rem 2rem; border-radius: 10px; margin-right: 3rem; "> |
||||
|
|
||||
|
<div class="row mt-4"> |
||||
|
<div class="col-lg-6"> |
||||
|
<a href="mailto:odoo@cybrosys.com" target="_blank" class="btn btn-block mb-2 deep_hover" |
||||
|
style="text-decoration: none; background-color: #4d4d4d; color: #FFF; border-radius: 4px;"><i |
||||
|
class="fa fa-envelope mr-2"></i>odoo@cybrosys.com</a> |
||||
|
</div> |
||||
|
<div class="col-lg-6"> |
||||
|
<a href="https://api.whatsapp.com/send?phone=918606827707" target="_blank" |
||||
|
class="btn btn-block mb-2 deep_hover" |
||||
|
style="text-decoration: none; background-color: #25D366; color: #FFF; border-radius: 4px;"><i |
||||
|
class="fa fa-whatsapp mr-2"></i>WhatsApp</a> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
</div> |
||||
|
<!-- End of Contact Cards --> |
||||
|
</section> |
||||
|
<!-- Footer --> |
||||
|
<section class="oe_container" style="padding: 2rem 3rem 1rem;"> |
||||
|
<div class="row" style="max-width:1540px; margin: 0 auto; margin-right: 3rem; "> |
||||
|
<!-- Logo --> |
||||
|
<div class="col-lg-12 d-flex justify-content-center align-items-center" style="margin-top: 3rem;"> |
||||
|
<img src="https://www.cybrosys.com/images/logo.png" width="200px" height="auto" /> |
||||
|
</div> |
||||
|
<!-- End of Logo --> |
||||
|
<div class="col-lg-12"> |
||||
|
<hr |
||||
|
style="margin-top: 3rem;background: linear-gradient(90deg, rgba(2,0,36,0) 0%, rgba(229,229,229,1) 33%, rgba(229,229,229,1) 58%, rgba(0,212,255,0) 100%); height: 2px; border-style: none;"> |
||||
|
<!-- End of Footer Section --> |
||||
|
</div> |
||||
|
</div> |
||||
|
</section> |
||||
|
<!-- END OF FOOTER --> |
||||
|
|
||||
|
</div> |
@ -0,0 +1,27 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||
|
|
||||
|
<odoo> |
||||
|
<data> |
||||
|
<record id="view_account_journal_form_inherit" model="ir.ui.view"> |
||||
|
<field name="name">view.account.journal.form.inherit</field> |
||||
|
<field name="model">account.journal</field> |
||||
|
<field name="inherit_id" ref="account.view_account_journal_form"/> |
||||
|
<field name="arch" type="xml"> |
||||
|
<xpath expr="//field[@name='company_id']" position="after"> |
||||
|
<field name="branch_id" options="{'no_create': True}"/> |
||||
|
</xpath> |
||||
|
</field> |
||||
|
</record> |
||||
|
|
||||
|
<record id="view_account_journal_tree_inherit" model="ir.ui.view"> |
||||
|
<field name="name">view.account.journal.tree</field> |
||||
|
<field name="model">account.journal</field> |
||||
|
<field name="inherit_id" ref="account.view_account_journal_tree"/> |
||||
|
<field name="arch" type="xml"> |
||||
|
<field name="company_id" position="after"> |
||||
|
<field name="branch_id"/> |
||||
|
</field> |
||||
|
</field> |
||||
|
</record> |
||||
|
</data> |
||||
|
</odoo> |
@ -0,0 +1,92 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||
|
<odoo> |
||||
|
<data> |
||||
|
<record id="view_move_form_branch_inherit" model="ir.ui.view"> |
||||
|
<field name="name">view.move.form.inherit</field> |
||||
|
<field name="model">account.move</field> |
||||
|
<field name="inherit_id" ref="account.view_move_form"/> |
||||
|
<field name="arch" type="xml"> |
||||
|
<xpath expr="//field[@name='invoice_date']" position="after"> |
||||
|
<field name="branch_id" options="{'no_create': True}" required="1" |
||||
|
attrs="{'readonly': [('state', '!=', 'draft')]}"/> |
||||
|
</xpath> |
||||
|
<xpath expr="//field[@name='invoice_line_ids']/tree/field[@name='account_id']" position="replace"> |
||||
|
<field name="account_id" |
||||
|
groups="account.group_account_readonly" |
||||
|
options="{'no_create': True}" |
||||
|
domain="[('deprecated', '=', False), |
||||
|
('user_type_id.type', 'not in', ('receivable', 'payable')), |
||||
|
('company_id', '=', parent.company_id), |
||||
|
('is_off_balance', '=', False), '|', ('branch_id', '=', parent.branch_id), |
||||
|
('branch_id', '=', False)]" |
||||
|
attrs="{'required': [('display_type', '=', False)]}"/> |
||||
|
</xpath> |
||||
|
</field> |
||||
|
</record> |
||||
|
|
||||
|
<record id="view_out_invoice_tree_inherit_branch" model="ir.ui.view"> |
||||
|
<field name="name">view.out.invoice.tree</field> |
||||
|
<field name="model">account.move</field> |
||||
|
<field name="inherit_id" ref="account.view_out_invoice_tree"/> |
||||
|
<field name="arch" type="xml"> |
||||
|
<field name="company_id" position="after"> |
||||
|
<field name="branch_id" optional="show"/> |
||||
|
</field> |
||||
|
</field> |
||||
|
</record> |
||||
|
|
||||
|
<record id="view_in_invoice_tree_inherit_branch" model="ir.ui.view"> |
||||
|
<field name="name">view.in.invoice.tree</field> |
||||
|
<field name="model">account.move</field> |
||||
|
<field name="inherit_id" ref="account.view_in_invoice_tree"/> |
||||
|
<field name="arch" type="xml"> |
||||
|
<field name="company_id" position="after"> |
||||
|
<field name="branch_id" optional="show"/> |
||||
|
</field> |
||||
|
</field> |
||||
|
</record> |
||||
|
|
||||
|
<record id="view_account_invoice_filter_inherit_branch" model="ir.ui.view"> |
||||
|
<field name="name">.view.account.invoice.filter.inherit</field> |
||||
|
<field name="model">account.move</field> |
||||
|
<field name="inherit_id" ref="account.view_account_invoice_filter"/> |
||||
|
<field name="arch" type="xml"> |
||||
|
<xpath expr="//search/group" position="inside"> |
||||
|
<filter string="Branch" name="Branch" context="{'group_by':'branch_id'}"/> |
||||
|
</xpath> |
||||
|
</field> |
||||
|
</record> |
||||
|
|
||||
|
<record id="view_move_line_form_inherit" model="ir.ui.view"> |
||||
|
<field name="name">view.move.line.form.inherit</field> |
||||
|
<field name="model">account.move.line</field> |
||||
|
<field name="inherit_id" ref="account.view_move_line_form"/> |
||||
|
<field name="arch" type="xml"> |
||||
|
<xpath expr="//field[@name='partner_id']" position="after"> |
||||
|
<field name="branch_id"/> |
||||
|
</xpath> |
||||
|
</field> |
||||
|
</record> |
||||
|
<record id="view_account_move_line_filter_inherit" model="ir.ui.view"> |
||||
|
<field name="name">.view.account.move.line.filter.inherit</field> |
||||
|
<field name="model">account.move.line</field> |
||||
|
<field name="inherit_id" ref="account.view_account_move_line_filter"/> |
||||
|
<field name="arch" type="xml"> |
||||
|
<xpath expr="//search/group" position="inside"> |
||||
|
<filter string="Branch" name="Branch" context="{'group_by':'branch_id'}"/> |
||||
|
</xpath> |
||||
|
</field> |
||||
|
</record> |
||||
|
<record id="view_account_move_filter_inherit" model="ir.ui.view"> |
||||
|
<field name="name">.view.account.move.filter.inherit</field> |
||||
|
<field name="model">account.move</field> |
||||
|
<field name="inherit_id" ref="account.view_account_move_filter"/> |
||||
|
<field name="arch" type="xml"> |
||||
|
<xpath expr="//search/group" position="inside"> |
||||
|
<filter string="Branch" name="Branch" context="{'group_by':'branch_id'}"/> |
||||
|
</xpath> |
||||
|
</field> |
||||
|
</record> |
||||
|
|
||||
|
</data> |
||||
|
</odoo> |
@ -0,0 +1,55 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||
|
<odoo> |
||||
|
<data> |
||||
|
<record id="view_account_payment_form_inherit" model="ir.ui.view"> |
||||
|
<field name="name">view.account.payment.form.inherit</field> |
||||
|
<field name="model">account.payment</field> |
||||
|
<field name="inherit_id" ref="account.view_account_payment_form"/> |
||||
|
<field name="arch" type="xml"> |
||||
|
<xpath expr="//field[@name='company_id']" position="after"> |
||||
|
<field name="branch_id" options="{'no_create': True}" |
||||
|
attrs="{'readonly': [('state', '!=', 'draft')]}"/> |
||||
|
</xpath> |
||||
|
<xpath expr="//field[@name='journal_id']" position="replace"> |
||||
|
<field name="journal_id" |
||||
|
widget="selection" |
||||
|
domain="[('type', 'in', ('bank', 'cash')) , '|', ('branch_id', '=', branch_id), ('branch_id', '=', False)]" |
||||
|
attrs="{'readonly': [('state', '!=', 'draft')]}"/> |
||||
|
</xpath> |
||||
|
</field> |
||||
|
</record> |
||||
|
|
||||
|
<record id="view_account_payment_tree_inherit" model="ir.ui.view"> |
||||
|
<field name="name">view.payment.tree</field> |
||||
|
<field name="model">account.payment</field> |
||||
|
<field name="inherit_id" ref="account.view_account_payment_tree"/> |
||||
|
<field name="arch" type="xml"> |
||||
|
<field name="company_id" position="after"> |
||||
|
<field name="branch_id" optional="show"/> |
||||
|
</field> |
||||
|
</field> |
||||
|
</record> |
||||
|
|
||||
|
<record id="view_account_supplier_payment_tree_inherit" model="ir.ui.view"> |
||||
|
<field name="name">view.supplier.payment.tree</field> |
||||
|
<field name="model">account.payment</field> |
||||
|
<field name="inherit_id" ref="account.view_account_supplier_payment_tree"/> |
||||
|
<field name="arch" type="xml"> |
||||
|
<field name="company_id" position="after"> |
||||
|
<field name="branch_id" optional="show" options="{'no_create': True}"/> |
||||
|
</field> |
||||
|
</field> |
||||
|
</record> |
||||
|
|
||||
|
<record id="view_account_payment_search_inherit" model="ir.ui.view"> |
||||
|
<field name="name">.view.account.payment.search.inherit</field> |
||||
|
<field name="model">account.payment</field> |
||||
|
<field name="inherit_id" ref="account.view_account_payment_search"/> |
||||
|
<field name="arch" type="xml"> |
||||
|
<xpath expr="//search" position="inside"> |
||||
|
<filter string="Branch" name="Branch" context="{'group_by':'branch_id'}"/> |
||||
|
</xpath> |
||||
|
</field> |
||||
|
</record> |
||||
|
</data> |
||||
|
</odoo> |
@ -0,0 +1,41 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||
|
|
||||
|
<odoo> |
||||
|
<data> |
||||
|
<record id="view_account_form_branch_inherit" model="ir.ui.view"> |
||||
|
<field name="name">view.account.form.inherit</field> |
||||
|
<field name="model">account.account</field> |
||||
|
<field name="inherit_id" ref="account.view_account_form"/> |
||||
|
<field name="arch" type="xml"> |
||||
|
<xpath expr="//group[@name='left_main_group']//field[@name='company_id']" position="after"> |
||||
|
<field name="branch_id" options="{'no_create': True}"/> |
||||
|
</xpath> |
||||
|
<xpath expr="//group[@name='security_group']//field[@name='allowed_journal_ids']" position="replace"> |
||||
|
<field name="allowed_journal_ids" widget="many2many_tags" |
||||
|
domain="[('company_id','=',company_id), '|', ('branch_id', '=', branch_id), ('branch_id', '=', False)]" |
||||
|
options="{'no_create_edit': True}"/> |
||||
|
</xpath> |
||||
|
</field> |
||||
|
</record> |
||||
|
<record id="view_account_list_inherit" model="ir.ui.view"> |
||||
|
<field name="name">view.account.list.inherit</field> |
||||
|
<field name="model">account.account</field> |
||||
|
<field name="inherit_id" ref="account.view_account_list"/> |
||||
|
<field name="arch" type="xml"> |
||||
|
<field name="company_id" position="after"> |
||||
|
<field name="branch_id" options="{'no_create': True}"/> |
||||
|
</field> |
||||
|
</field> |
||||
|
</record> |
||||
|
<record id="view_account_search_inherit" model="ir.ui.view"> |
||||
|
<field name="name">.view.account.search.inherit</field> |
||||
|
<field name="model">account.account</field> |
||||
|
<field name="inherit_id" ref="account.view_account_search"/> |
||||
|
<field name="arch" type="xml"> |
||||
|
<xpath expr="//search" position="inside"> |
||||
|
<filter string="Branch" name="Branch" context="{'group_by':'branch_id'}"/> |
||||
|
</xpath> |
||||
|
</field> |
||||
|
</record> |
||||
|
</data> |
||||
|
</odoo> |
@ -0,0 +1,15 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||
|
<odoo> |
||||
|
<data> |
||||
|
<record id="view_product_form_inherit" model="ir.ui.view"> |
||||
|
<field name="name">product.form.inherit</field> |
||||
|
<field name="model">product.template</field> |
||||
|
<field name="inherit_id" ref="product.product_template_form_view"/> |
||||
|
<field name="arch" type="xml"> |
||||
|
<field name="company_id" position="after"> |
||||
|
<field name="branch_id" options="{'no_create': True}" domain="[('company_id', '=', company_id)]"/> |
||||
|
</field> |
||||
|
</field> |
||||
|
</record> |
||||
|
</data> |
||||
|
</odoo> |
@ -0,0 +1,49 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||
|
<odoo> |
||||
|
<data> |
||||
|
<record id="view_purchase_order_form_inherit" model="ir.ui.view"> |
||||
|
<field name="name">purchase.order.form.inherit</field> |
||||
|
<field name="model">purchase.order</field> |
||||
|
<field name="inherit_id" ref="purchase.purchase_order_form"/> |
||||
|
<field name="arch" type="xml"> |
||||
|
<xpath expr="//page[@name='purchase_delivery_invoice']//field[@name='company_id']" position="after"> |
||||
|
<field name="branch_id" options="{'no_create': True}" domain="[('company_id', '=', company_id)]" required="1"/> |
||||
|
</xpath> |
||||
|
</field> |
||||
|
</record> |
||||
|
|
||||
|
<record id="view_purchase_order_search_view_inherit" model="ir.ui.view"> |
||||
|
<field name="name">purchase.order.search.view.inherit</field> |
||||
|
<field name="model">purchase.order</field> |
||||
|
<field name="inherit_id" ref="purchase.purchase_order_view_search"/> |
||||
|
<field name="arch" type="xml"> |
||||
|
<xpath expr="//search/group" position="inside"> |
||||
|
<filter string="Branch" name="Branch" context="{'group_by':'branch_id'}"/> |
||||
|
</xpath> |
||||
|
</field> |
||||
|
</record> |
||||
|
|
||||
|
<record id="view_purchase_order_filter_inherit" model="ir.ui.view"> |
||||
|
<field name="name">purchase.order.filter.inherit</field> |
||||
|
<field name="model">purchase.order</field> |
||||
|
<field name="inherit_id" ref="purchase.view_purchase_order_filter"/> |
||||
|
<field name="arch" type="xml"> |
||||
|
<xpath expr="//search/group" position="inside"> |
||||
|
<filter string="Branch" name="Branch" context="{'group_by':'branch_id'}"/> |
||||
|
</xpath> |
||||
|
</field> |
||||
|
</record> |
||||
|
|
||||
|
<record id="purchase_order_view_tree_inherit" model="ir.ui.view"> |
||||
|
<field name="name">view.purchase.order.tree</field> |
||||
|
<field name="model">purchase.order</field> |
||||
|
<field name="inherit_id" ref="purchase.purchase_order_view_tree"/> |
||||
|
<field name="arch" type="xml"> |
||||
|
<field name="company_id" position="after"> |
||||
|
<field name="branch_id" optional="show"/> |
||||
|
</field> |
||||
|
</field> |
||||
|
</record> |
||||
|
|
||||
|
</data> |
||||
|
</odoo> |
@ -0,0 +1,278 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||
|
<odoo> |
||||
|
<template id="branch_external_layout" inherit_id="web.external_layout"> |
||||
|
|
||||
|
<xpath expr="//t[@t-if='company.external_report_layout_id']" position="before"> |
||||
|
<t t-if="branch_id"> |
||||
|
<t t-set="branch" t-value="branch_id"/> |
||||
|
</t> |
||||
|
<t t-elif="o and 'branch_id' in o and o.branch_id.sudo()"> |
||||
|
<t t-set="branch" t-value="o.branch_id.sudo()"/> |
||||
|
</t> |
||||
|
<t t-else="else"> |
||||
|
<t t-set="branch" t-value="res_branch"/> |
||||
|
</t> |
||||
|
</xpath> |
||||
|
|
||||
|
</template> |
||||
|
|
||||
|
<template id="branch_external_layout_background" inherit_id="web.external_layout_background"> |
||||
|
<xpath expr="//div[hasclass('float-left')]" position="replace"> |
||||
|
<t t-if="branch"> |
||||
|
<t t-if="branch.street or branch.street2 or branch.city or branch.state_id or branch.zip or branch.country_id"> |
||||
|
<div class="float-left company_address"> |
||||
|
<div> |
||||
|
<strong t-field="company.partner_id.name"/> |
||||
|
<strong t-field="branch.name"/> |
||||
|
</div> |
||||
|
<div class="float-left company_address" t-if="branch.street" t-field="branch.street"/><br/> |
||||
|
<div class="float-left company_address" t-if="branch.street2" t-field="branch.street2"/><br/> |
||||
|
<div class="float-left company_address" t-if="branch.city" t-field="branch.city"/><br/> |
||||
|
<div class="float-left company_address" t-if="branch.zip" t-field="branch.zip"/><br/> |
||||
|
<div class="float-left company_address" t-if="branch.state_id" t-field="branch.state_id"/><br/> |
||||
|
<div class="float-left company_address" t-if="branch.country_id" t-field="branch.country_id"/> |
||||
|
</div> |
||||
|
</t> |
||||
|
<t t-else="else"> |
||||
|
<div class="float-left company_address"> |
||||
|
<div> |
||||
|
<strong t-field="company.partner_id.name"/> |
||||
|
</div> |
||||
|
<span t-field="company.partner_id" t-options='{"widget": "contact", "fields": ["address"], "no_marker": true}'/> |
||||
|
</div> |
||||
|
</t> |
||||
|
</t> |
||||
|
<t t-else="else"> |
||||
|
<div class="float-left company_address"> |
||||
|
<div> |
||||
|
<strong t-field="company.partner_id.name"/> |
||||
|
</div> |
||||
|
<span t-field="company.partner_id" t-options='{"widget": "contact", "fields": ["address"], "no_marker": true}'/> |
||||
|
</div> |
||||
|
</t> |
||||
|
</xpath> |
||||
|
<xpath expr="//li[@t-if='company.phone']" position="replace"> |
||||
|
<t t-if="branch"> |
||||
|
<li t-if="branch.phone" class="list-inline-item"><i class="fa fa-phone" role="img" aria-label="Phone" title="Phone"/> <span class="o_force_ltr" t-field="branch.phone"/></li> |
||||
|
<t t-else="else"> |
||||
|
<li t-if="company.phone" class="list-inline-item"><i class="fa fa-phone" role="img" aria-label="Phone" title="Phone"/> <span class="o_force_ltr" t-field="company.phone"/></li> |
||||
|
</t> |
||||
|
</t> |
||||
|
<t t-else="else"> |
||||
|
<li t-if="company.phone" class="list-inline-item"><i class="fa fa-phone" role="img" aria-label="Phone" title="Phone"/> <span class="o_force_ltr" t-field="company.phone"/></li> |
||||
|
</t> |
||||
|
</xpath> |
||||
|
<xpath expr="//li[@t-if='company.email']" position="replace"> |
||||
|
<t t-if="branch"> |
||||
|
<li t-if="branch.email" class="list-inline-item"><i class="fa fa-at" role="img" aria-label="Email" title="Email"/> <span t-field="branch.email"/></li> |
||||
|
<t t-else="else"> |
||||
|
<li t-if="company.email" class="list-inline-item"><i class="fa fa-at" role="img" aria-label="Email" title="Email"/> <span t-field="company.email"/></li> |
||||
|
</t> |
||||
|
</t> |
||||
|
<t t-else="else"> |
||||
|
<li t-if="company.email" class="list-inline-item"><i class="fa fa-at" role="img" aria-label="Email" title="Email"/> <span t-field="company.email"/></li> |
||||
|
</t> |
||||
|
</xpath> |
||||
|
<xpath expr="//li[@t-if='company.website']" position="replace"> |
||||
|
<t t-if="branch"> |
||||
|
<li t-if="branch.website" class="list-inline-item"><i class="fa fa-globe" role="img" aria-label="Website" title="Website"/> <span t-field="branch.website"/></li> |
||||
|
<t t-else="else"> |
||||
|
<li t-if="company.website" class="list-inline-item"><i class="fa fa-globe" role="img" aria-label="Website" title="Website"/> <span t-field="company.website"/></li> |
||||
|
</t> |
||||
|
</t> |
||||
|
<t t-else="else"> |
||||
|
<li t-if="company.website" class="list-inline-item"><i class="fa fa-globe" role="img" aria-label="Website" title="Website"/> <span t-field="company.website"/></li> |
||||
|
</t> |
||||
|
</xpath> |
||||
|
</template> |
||||
|
|
||||
|
<template id="branch_external_layout_boxed" inherit_id="web.external_layout_boxed"> |
||||
|
<xpath expr="//span[hasclass('company_address')]" position="replace"> |
||||
|
<t t-if="branch"> |
||||
|
<t t-if="branch.street or branch.street2 or branch.city or branch.state_id or branch.zip or branch.country_id"> |
||||
|
<span class="company_address" t-field="company.partner_id"/>, |
||||
|
<span class="company_address" t-field="branch.name"/><br/> |
||||
|
<span t-if="branch.street" t-field="branch.street"/><br/> |
||||
|
<span t-if="branch.street2" t-field="branch.street2"/><br/> |
||||
|
<span t-if="branch.city" t-field="branch.city"/>, |
||||
|
<span t-if="branch.zip" t-field="branch.zip"/><br/> |
||||
|
<span t-if="branch.state_id" t-field="branch.state_id"/><br/> |
||||
|
<span t-if="branch.country_id" t-field="branch.country_id"/> |
||||
|
</t> |
||||
|
<t t-else="else"> |
||||
|
<div name="company_address" class="float-right mb4"> |
||||
|
<span class="company_address" t-field="company.partner_id" |
||||
|
t-options='{"widget": "contact", "fields": ["address", "name"], "no_marker": true}'/> |
||||
|
</div> |
||||
|
</t> |
||||
|
</t> |
||||
|
<t t-else="else"> |
||||
|
<div name="company_address" class="float-right mb4"> |
||||
|
<span class="company_address" t-field="company.partner_id" |
||||
|
t-options='{"widget": "contact", "fields": ["address", "name"], "no_marker": true}'/> |
||||
|
</div> |
||||
|
</t> |
||||
|
</xpath> |
||||
|
<xpath expr="//li[@t-if='company.phone']" position="replace"> |
||||
|
<t t-if="branch"> |
||||
|
<li t-if="branch.phone" class="list-inline-item"><span class="o_force_ltr" t-field="branch.phone"/></li> |
||||
|
<t t-else="else"> |
||||
|
<li t-if="company.phone" class="list-inline-item"><span class="o_force_ltr" t-field="company.phone"/></li> |
||||
|
</t> |
||||
|
</t> |
||||
|
<t t-else="else"> |
||||
|
<li t-if="company.phone" class="list-inline-item"><span class="o_force_ltr" t-field="company.phone"/></li> |
||||
|
</t> |
||||
|
</xpath> |
||||
|
<xpath expr="//li[@t-if='company.email']" position="replace"> |
||||
|
<t t-if="branch"> |
||||
|
<li t-if="branch.email" class="list-inline-item"><span t-field="branch.email"/></li> |
||||
|
<t t-else="else"> |
||||
|
<li t-if="company.email" class="list-inline-item"><span t-field="company.email"/></li> |
||||
|
</t> |
||||
|
</t> |
||||
|
<t t-else="else"> |
||||
|
<li t-if="company.email" class="list-inline-item"><span t-field="company.email"/></li> |
||||
|
</t> |
||||
|
</xpath> |
||||
|
<xpath expr="//li[@t-if='company.website']" position="replace"> |
||||
|
<t t-if="branch"> |
||||
|
<li t-if="branch.website" class="list-inline-item"><span t-field="branch.website"/></li> |
||||
|
<t t-else="else"> |
||||
|
<li t-if="company.website" class="list-inline-item"><span t-field="company.website"/></li> |
||||
|
</t> |
||||
|
</t> |
||||
|
<t t-else="else"> |
||||
|
<li t-if="company.website" class="list-inline-item"><span t-field="company.website"/></li> |
||||
|
</t> |
||||
|
</xpath> |
||||
|
</template> |
||||
|
|
||||
|
<template id="branch_external_layout_clean" inherit_id="web.external_layout_clean"> |
||||
|
<xpath expr="//li[@t-if='company.name']" position="after"> |
||||
|
<t t-if="branch"> |
||||
|
<strong><li t-if="branch.name"><span t-field="branch.name"/></li></strong> |
||||
|
</t> |
||||
|
</xpath> |
||||
|
<xpath expr="//li[@t-if='company.phone']" position="replace"> |
||||
|
<t t-if="branch"> |
||||
|
<li t-if="branch.phone">Tel: <span class="o_force_ltr" t-field="branch.phone"/></li> |
||||
|
<t t-else="else"> |
||||
|
<li t-if="company.phone">Tel: <span class="o_force_ltr" t-field="company.phone"/></li> |
||||
|
</t> |
||||
|
</t> |
||||
|
<t t-else="else"> |
||||
|
<li t-if="company.phone">Tel: <span class="o_force_ltr" t-field="company.phone"/></li> |
||||
|
</t> |
||||
|
</xpath> |
||||
|
<xpath expr="//li[@t-if='company.email']" position="replace"> |
||||
|
<t t-if="branch"> |
||||
|
<li t-if="branch.email"><span t-field="branch.email"/></li> |
||||
|
<t t-else="else"> |
||||
|
<li t-if="company.email"><span t-field="company.email"/></li> |
||||
|
</t> |
||||
|
</t> |
||||
|
<t t-else="else"> |
||||
|
<li t-if="company.email"><span t-field="company.email"/></li> |
||||
|
</t> |
||||
|
</xpath> |
||||
|
<xpath expr="//li[@t-if='company.website']" position="replace"> |
||||
|
<t t-if="branch"> |
||||
|
<li t-if="branch.website"><span t-field="branch.website"/></li> |
||||
|
<t t-else="else"> |
||||
|
<li t-if="company.website"><span t-field="company.website"/></li> |
||||
|
</t> |
||||
|
</t> |
||||
|
<t t-else="else"> |
||||
|
<li t-if="company.website"><span t-field="company.website"/></li> |
||||
|
</t> |
||||
|
</xpath> |
||||
|
<xpath expr="//span[hasclass('company_address')]" position="replace"> |
||||
|
<t t-if="branch"> |
||||
|
<t t-if="branch.street or branch.street2 or branch.city or branch.state_id or branch.zip or branch.country_id"> |
||||
|
<span t-if="branch.street" t-field="branch.street"/><br/> |
||||
|
<span t-if="branch.street2" t-field="branch.street2"/><br/> |
||||
|
<span t-if="branch.city" t-field="branch.city"/>, |
||||
|
<span t-if="branch.zip" t-field="branch.zip"/><br/> |
||||
|
<span t-if="branch.state_id" t-field="branch.state_id"/><br/> |
||||
|
<span t-if="branch.country_id" t-field="branch.country_id"/> |
||||
|
</t> |
||||
|
<t t-else="else"> |
||||
|
<span class="company_address" t-field="company.partner_id" |
||||
|
t-options='{"widget": "contact", "fields": ["address"], "no_marker": true}'/> |
||||
|
</t> |
||||
|
</t> |
||||
|
<t t-else="else"> |
||||
|
<span class="company_address" t-field="company.partner_id" |
||||
|
t-options='{"widget": "contact", "fields": ["address"], "no_marker": true}'/> |
||||
|
</t> |
||||
|
</xpath> |
||||
|
</template> |
||||
|
|
||||
|
<template id="branch_external_layout_standard" inherit_id="web.external_layout_standard"> |
||||
|
<xpath expr="//div[hasclass('col-6')]" position="replace"> |
||||
|
<t t-if="branch"> |
||||
|
<t t-if="branch.street or branch.street2 or branch.city or branch.state_id or branch.zip or branch.country_id"> |
||||
|
<div class="col-6" name="company_address"> |
||||
|
<span class="company_address" t-field="company.partner_id"/>, |
||||
|
<span class="company_address" t-field="branch.name"/><br/> |
||||
|
<span t-if="branch.street" t-field="branch.street"/><br/> |
||||
|
<span t-if="branch.street2" t-field="branch.street2"/><br/> |
||||
|
<span t-if="branch.city" t-field="branch.city"/>, |
||||
|
<span t-if="branch.zip" t-field="branch.zip"/><br/> |
||||
|
<span t-if="branch.state_id" t-field="branch.state_id"/><br/> |
||||
|
<span t-if="branch.country_id" t-field="branch.country_id"/> |
||||
|
</div> |
||||
|
</t> |
||||
|
<t t-else="else"> |
||||
|
<div class="col-6" name="company_address"> |
||||
|
<div t-field="company.partner_id" |
||||
|
t-options='{"widget": "contact", "fields": ["address", "name"], "no_marker": true}' |
||||
|
/> |
||||
|
</div> |
||||
|
</t> |
||||
|
|
||||
|
</t> |
||||
|
<t t-else="else"> |
||||
|
<div class="col-6" name="company_address"> |
||||
|
<div t-field="company.partner_id" |
||||
|
t-options='{"widget": "contact", "fields": ["address", "name"], "no_marker": true}' |
||||
|
/> |
||||
|
</div> |
||||
|
</t> |
||||
|
</xpath> |
||||
|
<xpath expr="//li[@t-if='company.phone']" position="replace"> |
||||
|
<t t-if="branch"> |
||||
|
<li t-if="branch.phone" class="list-inline-item d-inline"><span class="o_force_ltr" t-field="branch.phone"/></li> |
||||
|
<t t-else="else"> |
||||
|
<li t-if="company.phone" class="list-inline-item d-inline"><span class="o_force_ltr" t-field="company.phone"/></li> |
||||
|
</t> |
||||
|
</t> |
||||
|
<t t-else="else"> |
||||
|
<li t-if="company.phone" class="list-inline-item d-inline"><span class="o_force_ltr" t-field="company.phone"/></li> |
||||
|
</t> |
||||
|
</xpath> |
||||
|
<xpath expr="//li[@t-if='company.email']" position="replace"> |
||||
|
<t t-if="branch"> |
||||
|
<li t-if="branch.email" class="list-inline-item d-inline"><span t-field="branch.email"/></li> |
||||
|
<t t-else="else"> |
||||
|
<li t-if="company.email" class="list-inline-item d-inline"><span t-field="company.email"/></li> |
||||
|
</t> |
||||
|
</t> |
||||
|
<t t-else="else"> |
||||
|
<li t-if="company.email" class="list-inline-item d-inline"><span t-field="company.email"/></li> |
||||
|
</t> |
||||
|
</xpath> |
||||
|
<xpath expr="//li[@t-if='company.website']" position="replace"> |
||||
|
<t t-if="branch"> |
||||
|
<li t-if="branch.website" class="list-inline-item d-inline"><span t-field="branch.website"/></li> |
||||
|
<t t-else="else"> |
||||
|
<li t-if="company.website" class="list-inline-item d-inline"><span t-field="company.website"/></li> |
||||
|
</t> |
||||
|
</t> |
||||
|
<t t-else="else"> |
||||
|
<li t-if="company.website" class="list-inline-item d-inline"><span t-field="company.website"/></li> |
||||
|
</t> |
||||
|
</xpath> |
||||
|
</template> |
||||
|
</odoo> |
@ -0,0 +1,16 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||
|
<odoo> |
||||
|
<data> |
||||
|
<record id="view_partner_form_inherit" model="ir.ui.view"> |
||||
|
<field name="name">res.partner.form.inherit</field> |
||||
|
<field name="model">res.partner</field> |
||||
|
<field name="inherit_id" ref="base.view_partner_form"/> |
||||
|
<field name="arch" type="xml"> |
||||
|
<field name="vat" position="after"> |
||||
|
<field name="branch_id" options="{'no_create': True}" domain="[('company_id', '=', company_id)]" attrs="{'readonly': [('parent_id', '!=', False)]}" |
||||
|
force_save="1"/> |
||||
|
</field> |
||||
|
</field> |
||||
|
</record> |
||||
|
</data> |
||||
|
</odoo> |
@ -0,0 +1,18 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||
|
<odoo> |
||||
|
<data> |
||||
|
<record id="view_users_form_inherit" model="ir.ui.view"> |
||||
|
<field name="name">res.users.form.inherit</field> |
||||
|
<field name="model">res.users</field> |
||||
|
<field name="inherit_id" ref="base.view_users_form"/> |
||||
|
<field name="arch" type="xml"> |
||||
|
<xpath expr="//page[@name='access_rights']//group" position="after"> |
||||
|
<group string="Multi Branches"> |
||||
|
<field name="branch_ids" widget="many2many_tags" options="{'no_create': True}"/> |
||||
|
<field name="branch_id" options="{'no_create': True}" required="1"/> |
||||
|
</group> |
||||
|
</xpath> |
||||
|
</field> |
||||
|
</record> |
||||
|
</data> |
||||
|
</odoo> |
@ -0,0 +1,54 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||
|
<odoo> |
||||
|
<data> |
||||
|
<record id="view_sale_order_form_inherit" model="ir.ui.view"> |
||||
|
<field name="name">sale.order.form.inherit</field> |
||||
|
<field name="model">sale.order</field> |
||||
|
<field name="inherit_id" ref="sale.view_order_form"/> |
||||
|
<field name="arch" type="xml"> |
||||
|
<xpath expr="//page[@name='other_information']//field[@name='company_id']" position="after"> |
||||
|
<field name="branch_id" options="{'no_create': True}" domain="[('company_id', '=', company_id)]" required="1"/> |
||||
|
</xpath> |
||||
|
<xpath expr="//page[@name='other_information']//field[@name='warehouse_id']" position="replace"> |
||||
|
<field name="warehouse_id" options="{'no_create': True}" |
||||
|
domain="['|', ('branch_id', '=', branch_id), ('branch_id', '=', False)]" |
||||
|
groups="stock.group_stock_multi_warehouses" |
||||
|
force_save="1"/> |
||||
|
</xpath> |
||||
|
</field> |
||||
|
</record> |
||||
|
|
||||
|
<record id="view_sale_order_search_view_inherit" model="ir.ui.view"> |
||||
|
<field name="name">sale.order.search.view.inherit</field> |
||||
|
<field name="model">sale.order</field> |
||||
|
<field name="inherit_id" ref="sale.sale_order_view_search_inherit_sale"/> |
||||
|
<field name="arch" type="xml"> |
||||
|
<xpath expr="//search/group" position="inside"> |
||||
|
<filter string="Branch" name="Branch" context="{'group_by':'branch_id'}"/> |
||||
|
</xpath> |
||||
|
</field> |
||||
|
</record> |
||||
|
|
||||
|
<record id="sale_order_view_search_inherit_quotation_inherit" model="ir.ui.view"> |
||||
|
<field name="name">sale.quotation.search.view.inherit</field> |
||||
|
<field name="model">sale.order</field> |
||||
|
<field name="inherit_id" ref="sale.sale_order_view_search_inherit_quotation"/> |
||||
|
<field name="arch" type="xml"> |
||||
|
<xpath expr="//search/group" position="inside"> |
||||
|
<filter string="Branch" name="Branch" context="{'group_by':'branch_id'}"/> |
||||
|
</xpath> |
||||
|
</field> |
||||
|
</record> |
||||
|
|
||||
|
<record id="view_order_tree_inherit" model="ir.ui.view"> |
||||
|
<field name="name">view.order.tree</field> |
||||
|
<field name="model">sale.order</field> |
||||
|
<field name="inherit_id" ref="sale.view_order_tree"/> |
||||
|
<field name="arch" type="xml"> |
||||
|
<field name="company_id" position="after"> |
||||
|
<field name="branch_id" optional="show"/> |
||||
|
</field> |
||||
|
</field> |
||||
|
</record> |
||||
|
</data> |
||||
|
</odoo> |
@ -0,0 +1,43 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||
|
<odoo> |
||||
|
<data> |
||||
|
<record id="view_stock_picking_form_inherit" model="ir.ui.view"> |
||||
|
<field name="name">stock_picking.form.inherit</field> |
||||
|
<field name="model">stock.picking</field> |
||||
|
<field name="inherit_id" ref="stock.view_picking_form"/> |
||||
|
<field name="arch" type="xml"> |
||||
|
<xpath expr="//page[@name='extra']//field[@name='company_id']" position="after"> |
||||
|
<field name="branch_id" domain="[('company_id', '=', company_id)]" options="{'no_create': True}" required="1" |
||||
|
attrs="{'readonly': [('state', '!=', 'draft')]}"/> |
||||
|
</xpath> |
||||
|
<xpath expr="//field[@name='picking_type_id']" position="replace"> |
||||
|
<field name="picking_type_id" |
||||
|
attrs="{'invisible': [('hide_picking_type', '=', True)], 'readonly': [('state', '!=', 'draft')]}" |
||||
|
domain="['|', ('branch_id', '=', branch_id), ('branch_id', '=', False)]"/> |
||||
|
</xpath> |
||||
|
</field> |
||||
|
</record> |
||||
|
|
||||
|
<record id="view_picking_internal_search_inherit" model="ir.ui.view"> |
||||
|
<field name="name">picking.internal.search.inherit</field> |
||||
|
<field name="model">stock.picking</field> |
||||
|
<field name="inherit_id" ref="stock.view_picking_internal_search"/> |
||||
|
<field name="arch" type="xml"> |
||||
|
<xpath expr="//search/group" position="inside"> |
||||
|
<filter string="Branch" name="Branch" context="{'group_by':'branch_id'}"/> |
||||
|
</xpath> |
||||
|
</field> |
||||
|
</record> |
||||
|
|
||||
|
<record id="view_picking_type_form_inherit" model="ir.ui.view"> |
||||
|
<field name="name">view_picking.type.form.inherit</field> |
||||
|
<field name="model">stock.picking.type</field> |
||||
|
<field name="inherit_id" ref="stock.view_picking_type_form"/> |
||||
|
<field name="arch" type="xml"> |
||||
|
<xpath expr="//field[@name='company_id']" position="after"> |
||||
|
<field name="branch_id" options="{'no_create': True}"/> |
||||
|
</xpath> |
||||
|
</field> |
||||
|
</record> |
||||
|
</data> |
||||
|
</odoo> |
@ -0,0 +1,128 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||
|
|
||||
|
<odoo> |
||||
|
<data> |
||||
|
<record id="view_warehouse_inherit" model="ir.ui.view"> |
||||
|
<field name="name">view.warehouse.inherit</field> |
||||
|
<field name="model">stock.warehouse</field> |
||||
|
<field name="inherit_id" ref="stock.view_warehouse"/> |
||||
|
<field name="arch" type="xml"> |
||||
|
<xpath expr="//field[@name='company_id']" position="after"> |
||||
|
<field name="branch_id" options="{'no_create': True}"/> |
||||
|
</xpath> |
||||
|
</field> |
||||
|
</record> |
||||
|
|
||||
|
<record id="view_warehouse_tree_inherit" model="ir.ui.view"> |
||||
|
<field name="name">view.warehouse.tree</field> |
||||
|
<field name="model">stock.warehouse</field> |
||||
|
<field name="inherit_id" ref="stock.view_warehouse_tree"/> |
||||
|
<field name="arch" type="xml"> |
||||
|
<field name="company_id" position="after"> |
||||
|
<field name="branch_id"/> |
||||
|
</field> |
||||
|
</field> |
||||
|
</record> |
||||
|
<!-- Stock move form view --> |
||||
|
<record id="view_move_form_inherit" model="ir.ui.view"> |
||||
|
<field name="name">stock.move.form.inherit</field> |
||||
|
<field name="model">stock.move</field> |
||||
|
<field name="inherit_id" ref="stock.view_move_form"/> |
||||
|
<field name="arch" type="xml"> |
||||
|
<xpath expr="//field[@name='company_id']" position="after"> |
||||
|
<field name="branch_id" options="{'no_create': True}"/> |
||||
|
</xpath> |
||||
|
</field> |
||||
|
</record> |
||||
|
<!-- stock move tree view--> |
||||
|
<record id="view_move_tree_inherit" model="ir.ui.view"> |
||||
|
<field name="name">stock.move.tree.inherit</field> |
||||
|
<field name="model">stock.move</field> |
||||
|
<field name="inherit_id" ref="stock.view_move_tree"/> |
||||
|
<field name="arch" type="xml"> |
||||
|
<xpath expr="//field[@name='company_id']" position="after"> |
||||
|
<field name="branch_id"/> |
||||
|
</xpath> |
||||
|
</field> |
||||
|
</record> |
||||
|
<!-- stock move search view--> |
||||
|
<record id="view_move_search_inherit" model="ir.ui.view"> |
||||
|
<field name="name">stock.move.search.inherit</field> |
||||
|
<field name="model">stock.move</field> |
||||
|
<field name="inherit_id" ref="stock.view_move_search"/> |
||||
|
<field name="arch" type="xml"> |
||||
|
<xpath expr="//search/group" position="inside"> |
||||
|
<filter string="Branch" name="Branch" context="{'group_by':'branch_id'}"/> |
||||
|
</xpath> |
||||
|
</field> |
||||
|
</record> |
||||
|
|
||||
|
<!-- stock move line--> |
||||
|
<record id="view_stock_move_line_form_inherit" model="ir.ui.view"> |
||||
|
<field name="name">stock.move.line.form.inherit</field> |
||||
|
<field name="model">stock.move.line</field> |
||||
|
<field name="inherit_id" ref="stock.view_move_line_form"/> |
||||
|
<field name="arch" type="xml"> |
||||
|
<xpath expr="//field[@name='owner_id']" position="after"> |
||||
|
<field name="branch_id" options="{'no_create': True}"/> |
||||
|
</xpath> |
||||
|
</field> |
||||
|
</record> |
||||
|
|
||||
|
<record id="view_move_line_tree_inherit" model="ir.ui.view"> |
||||
|
<field name="name">stock.move.line.tree.inherit</field> |
||||
|
<field name="model">stock.move.line</field> |
||||
|
<field name="inherit_id" ref="stock.view_move_line_tree"/> |
||||
|
<field name="arch" type="xml"> |
||||
|
<xpath expr="//field[@name='company_id']" position="after"> |
||||
|
<field name="branch_id" options="{'no_create': True}"/> |
||||
|
</xpath> |
||||
|
</field> |
||||
|
</record> |
||||
|
|
||||
|
<record id="stock_move_line_view_search_inherit" model="ir.ui.view"> |
||||
|
<field name="name">stock.move.line.search.inherit</field> |
||||
|
<field name="model">stock.move.line</field> |
||||
|
<field name="inherit_id" ref="stock.stock_move_line_view_search"/> |
||||
|
<field name="arch" type="xml"> |
||||
|
<xpath expr="//search/group" position="inside"> |
||||
|
<filter string="Branch" name="Branch" context="{'group_by':'branch_id'}"/> |
||||
|
</xpath> |
||||
|
</field> |
||||
|
</record> |
||||
|
|
||||
|
<!-- valuation stock--> |
||||
|
<record id="stock_valuation_layer_form_inherit" model="ir.ui.view"> |
||||
|
<field name="name">stock.valuation.form.inherit</field> |
||||
|
<field name="model">stock.valuation.layer</field> |
||||
|
<field name="inherit_id" ref="stock_account.stock_valuation_layer_form"/> |
||||
|
<field name="arch" type="xml"> |
||||
|
<xpath expr="//page[@name='other_info']//field[@name='company_id']" position="after"> |
||||
|
<field name="branch_id" options="{'no_create': True}"/> |
||||
|
</xpath> |
||||
|
</field> |
||||
|
</record> |
||||
|
|
||||
|
<record id="stock_valuation_layer_tree_inherit" model="ir.ui.view"> |
||||
|
<field name="name">stock.valuation.tree.inherit</field> |
||||
|
<field name="model">stock.valuation.layer</field> |
||||
|
<field name="inherit_id" ref="stock_account.stock_valuation_layer_tree"/> |
||||
|
<field name="arch" type="xml"> |
||||
|
<xpath expr="//field[@name='company_id']" position="after"> |
||||
|
<field name="branch_id"/> |
||||
|
</xpath> |
||||
|
</field> |
||||
|
</record> |
||||
|
|
||||
|
<record id="view_inventory_valuation_search_inherit" model="ir.ui.view"> |
||||
|
<field name="name">stock.valuation.search.inherit</field> |
||||
|
<field name="model">stock.valuation.layer</field> |
||||
|
<field name="inherit_id" ref="stock_account.view_inventory_valuation_search"/> |
||||
|
<field name="arch" type="xml"> |
||||
|
<xpath expr="//search/group" position="inside"> |
||||
|
<filter string="Branch" name="Branch" context="{'group_by':'branch_id'}"/> |
||||
|
</xpath> |
||||
|
</field> |
||||
|
</record> |
||||
|
</data> |
||||
|
</odoo> |
@ -0,0 +1,87 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||
|
<odoo> |
||||
|
<data> |
||||
|
<!-- form view --> |
||||
|
<record id="view_branch_form" model="ir.ui.view"> |
||||
|
<field name="name">res.branch.form</field> |
||||
|
<field name="model">res.branch</field> |
||||
|
<field name="arch" type="xml"> |
||||
|
<form string="Branch"> |
||||
|
<sheet> |
||||
|
<div class="oe_title"> |
||||
|
<label for="name" class="oe_edit_only"/> |
||||
|
<h1> |
||||
|
<field name="name"/> |
||||
|
</h1> |
||||
|
</div> |
||||
|
<notebook colspan="4"> |
||||
|
<page string="Contact Information" name="contact_info"> |
||||
|
<group> |
||||
|
<group> |
||||
|
<label for="street" string="Address"/> |
||||
|
<div class="o_address_format"> |
||||
|
<field name="street" placeholder="Street..." class="o_address_street"/> |
||||
|
<field name="street2" placeholder="Street 2..." class="o_address_street"/> |
||||
|
<field name="city" placeholder="City" class="o_address_city"/> |
||||
|
<field name="state_id" class="o_address_state" placeholder="State" options='{"no_open": True}'/> |
||||
|
<field name="zip" placeholder="ZIP" class="o_address_zip"/> |
||||
|
<field name="country_id" placeholder="Country" class="o_address_country" options='{"no_open": True}'/> |
||||
|
</div> |
||||
|
</group> |
||||
|
<group> |
||||
|
<field name="company_id" options='{"no_create": True}'/> |
||||
|
<field name="phone" class="o_force_ltr"/> |
||||
|
<field name="email"/> |
||||
|
<field name="website" string="Website" widget="url" placeholder="e.g. https://www.odoo.com"/> |
||||
|
</group> |
||||
|
</group> |
||||
|
</page> |
||||
|
</notebook> |
||||
|
</sheet> |
||||
|
</form> |
||||
|
</field> |
||||
|
</record> |
||||
|
<!-- tree view --> |
||||
|
<record id="view_branch_tree" model="ir.ui.view"> |
||||
|
<field name="name">res.branch.tree</field> |
||||
|
<field name="model">res.branch</field> |
||||
|
<field name="arch" type="xml"> |
||||
|
<tree string="Branches" sample="1"> |
||||
|
<field name="name"/> |
||||
|
<field name="company_id"/> |
||||
|
<field name="phone"/> |
||||
|
</tree> |
||||
|
</field> |
||||
|
</record> |
||||
|
<!-- search view --> |
||||
|
<record id="res_branch_search" model="ir.ui.view"> |
||||
|
<field name="name">res.branch.search</field> |
||||
|
<field name="model">res.branch</field> |
||||
|
<field name="arch" type="xml"> |
||||
|
<search string="Branches"> |
||||
|
<field name="name" string="Branch"/> |
||||
|
<group expand="1" string="Group By"> |
||||
|
<filter string="Company" name="groupby_company" |
||||
|
context="{'group_by': 'company_id'}"/> |
||||
|
</group> |
||||
|
</search> |
||||
|
</field> |
||||
|
</record> |
||||
|
<!-- View action for branch views --> |
||||
|
<record id="action_res_branch_form" model="ir.actions.act_window"> |
||||
|
<field name="name">Branches</field> |
||||
|
<field name="type">ir.actions.act_window</field> |
||||
|
<field name="res_model">res.branch</field> |
||||
|
<field name="view_mode">tree,form</field> |
||||
|
<field name="help" type="html"> |
||||
|
<p class="o_view_nocontent_smiling_face"> |
||||
|
Create a new Branch |
||||
|
</p><p> |
||||
|
Create and manage branches for the companies that will be managed by Odoo from here. |
||||
|
</p> |
||||
|
</field> |
||||
|
</record> |
||||
|
<!-- Menu item --> |
||||
|
<menuitem action="action_res_branch_form" id="menu_action_res_branch_form" parent="base.menu_users"/> |
||||
|
</data> |
||||
|
</odoo> |
@ -0,0 +1,23 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
############################################################################# |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# |
||||
|
# Copyright (C) 2022-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 LESSER |
||||
|
# GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. |
||||
|
# |
||||
|
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE |
||||
|
# (LGPL v3) along with this program. |
||||
|
# If not, see <http://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
############################################################################# |
||||
|
|
||||
|
from . import branch_account_payment_register |
@ -0,0 +1,100 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
############################################################################# |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# |
||||
|
# Copyright (C) 2022-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 LESSER |
||||
|
# GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. |
||||
|
# |
||||
|
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE |
||||
|
# (LGPL v3) along with this program. |
||||
|
# If not, see <http://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
############################################################################# |
||||
|
|
||||
|
from odoo import models, fields, api |
||||
|
|
||||
|
|
||||
|
class AccountPaymentRegister(models.TransientModel): |
||||
|
"""inherited account payment register wizard models""" |
||||
|
_inherit = 'account.payment.register' |
||||
|
|
||||
|
branch_id = fields.Many2one('res.branch', store=True, readonly=False) |
||||
|
journal_id = fields.Many2one('account.journal', store=True, readonly=False, |
||||
|
compute='_compute_journal_id', |
||||
|
domain="[('company_id', '=', company_id), " |
||||
|
"('type', 'in', ('bank', 'cash'))]") |
||||
|
|
||||
|
@api.depends('company_id', 'source_currency_id') |
||||
|
def _compute_journal_id(self): |
||||
|
"""methode to compute journal id based on current branch""" |
||||
|
self.ensure_one() |
||||
|
lines = self.line_ids._origin |
||||
|
branch = lines.branch_id |
||||
|
if branch: |
||||
|
for wizard in self: |
||||
|
domain = [ |
||||
|
('type', 'in', ('bank', 'cash')), |
||||
|
('branch_id', '=', branch.id), |
||||
|
] |
||||
|
journal = None |
||||
|
if wizard.source_currency_id: |
||||
|
journal = self.env['account.journal'].search(domain + [ |
||||
|
('currency_id', '=', wizard.source_currency_id.id)], |
||||
|
limit=1) |
||||
|
if not journal: |
||||
|
journal = self.env['account.journal'].search(domain, |
||||
|
limit=1) |
||||
|
if not journal: |
||||
|
domain = [ |
||||
|
('type', 'in', ('bank', 'cash')), |
||||
|
('branch_id', '=', False), |
||||
|
] |
||||
|
journal = None |
||||
|
if wizard.source_currency_id: |
||||
|
journal = self.env['account.journal'].search(domain + [ |
||||
|
('currency_id', '=', wizard.source_currency_id.id)], |
||||
|
limit=1) |
||||
|
if not journal: |
||||
|
journal = self.env['account.journal'].search(domain, |
||||
|
limit=1) |
||||
|
wizard.journal_id = journal |
||||
|
else: |
||||
|
res = super(AccountPaymentRegister, self)._compute_journal_id() |
||||
|
return res |
||||
|
|
||||
|
def _create_payment_vals_from_wizard(self): |
||||
|
"""create payment values""" |
||||
|
self.ensure_one() |
||||
|
lines = self.line_ids._origin |
||||
|
branch = lines.branch_id |
||||
|
payment_vals = { |
||||
|
'date': self.payment_date, |
||||
|
'amount': self.amount, |
||||
|
'payment_type': self.payment_type, |
||||
|
'partner_type': self.partner_type, |
||||
|
'ref': self.communication, |
||||
|
'journal_id': self.journal_id.id, |
||||
|
'branch_id': branch.id, |
||||
|
'currency_id': self.currency_id.id, |
||||
|
'partner_id': self.partner_id.id, |
||||
|
'partner_bank_id': self.partner_bank_id.id, |
||||
|
'payment_method_id': self.payment_method_id.id, |
||||
|
'destination_account_id': self.line_ids[0].account_id.id |
||||
|
} |
||||
|
if not self.currency_id.is_zero( |
||||
|
self.payment_difference) and self.payment_difference_handling == 'reconcile': |
||||
|
payment_vals['write_off_line_vals'] = { |
||||
|
'name': self.writeoff_label, |
||||
|
'amount': self.payment_difference, |
||||
|
'account_id': self.writeoff_account_id.id, |
||||
|
} |
||||
|
return payment_vals |