@ -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,60 @@ |
|||
# -*- 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': "16.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.png'], |
|||
'license': "AGPL-3", |
|||
'installable': True, |
|||
'application': False |
|||
} |
@ -0,0 +1,6 @@ |
|||
## Module <multi_branch_base> |
|||
|
|||
#### 03.11.2022 |
|||
#### Version 16.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,90 @@ |
|||
# -*- 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)," |
|||
"'|', ('account_type', '=', default_account_type), " |
|||
"('account_type', 'not in', ('asset_receivable', 'liability_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="[('deprecated', '=', False), ('company_id', '=', company_id), \ |
|||
('account_type', 'not in', ('asset_receivable', 'liability_payable')), \ |
|||
('account_type', '=', 'asset_current')], '|', " |
|||
"('branch_id', '=', branch_id), ('branch_id', '=', False)") |
|||
|
|||
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="[('deprecated', '=', False), ('company_id', '=', company_id), \ |
|||
('account_type', 'not in', ('asset_receivable', 'liability_payable')), \ |
|||
('account_type', 'in', ('income', 'income_other')), '|', " |
|||
"('branch_id', '=', branch_id), ('branch_id', '=', False)]") |
|||
|
|||
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="[('deprecated', '=', False), ('company_id', '=', company_id), \ |
|||
('account_type', 'not in', ('asset_receivable', 'liability_payable')), \ |
|||
('account_type', '=', 'expense'), '|', " |
|||
"('branch_id', '=', branch_id), ('branch_id', '=', False)]") |
|||
|
|||
@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,177 @@ |
|||
# -*- 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" |
|||
|
|||
def _search_default_journal(self): |
|||
if len(self.env.user.branch_ids) == 1: |
|||
if self.is_sale_document(include_receipts=True): |
|||
journal_types = ['sale'] |
|||
elif self.is_purchase_document(include_receipts=True): |
|||
journal_types = ['purchase'] |
|||
elif self.payment_id or self.env.context.get('is_payment'): |
|||
journal_types = ['bank', 'cash'] |
|||
else: |
|||
journal_types = ['general'] |
|||
branch_id = self.env.user.branch_id.id |
|||
domain = [('branch_id', '=', branch_id), ('type', 'in', journal_types)] |
|||
journal = None |
|||
currency_id = self.currency_id.id or self._context.get('default_currency_id') |
|||
if currency_id and currency_id != self.company_id.currency_id.id: |
|||
currency_domain = domain + [('currency_id', '=', 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 %(branch_name)s for any of those types: %(journal_types)s", |
|||
branch_name=branch.name, |
|||
journal_types=', '.join(journal_types), |
|||
) |
|||
raise UserError(error_msg) |
|||
else: |
|||
journal = super(AccountMove, self)._search_default_journal() |
|||
return journal |
|||
|
|||
def _get_default_branch(self): |
|||
if len(self.env.user.branch_ids) == 1: |
|||
branch = self.env.user.branch_id |
|||
return branch |
|||
return False |
|||
|
|||
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: |
|||
return super(AccountMove, self)._compute_suitable_journal_ids() |
|||
|
|||
@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( |
|||
comodel_name='account.account', |
|||
string='Account', |
|||
compute='_compute_account_id', store=True, readonly=False, precompute=True, |
|||
inverse='_inverse_account_id', |
|||
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,107 @@ |
|||
# -*- 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="[('account_type', 'in', ('asset_receivable', 'liability_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', 'destination_journal_id') |
|||
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,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, api |
|||
|
|||
|
|||
class ProductTemplate(models.Model): |
|||
"""inherited product""" |
|||
_inherit = 'product.template' |
|||
|
|||
branch_id = fields.Many2one("res.branch", string='Branch', store=True, |
|||
help='Leave this field empty if this product is' |
|||
' shared between all branches' |
|||
) |
|||
allowed_branch_ids = fields.Many2many('res.branch', store=True, |
|||
string="Allowed Branches", |
|||
compute='_compute_allowed_branch_ids') |
|||
|
|||
@api.depends('company_id') |
|||
def _compute_allowed_branch_ids(self): |
|||
for po in self: |
|||
po.allowed_branch_ids = self.env.user.branch_ids.ids |
@ -0,0 +1,196 @@ |
|||
# -*- 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="['|', ('warehouse_id', '=', False), " |
|||
"('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") |
|||
|
|||
allowed_branch_ids = fields.Many2many('res.branch', store=True, |
|||
string="Allowed Branches", |
|||
compute='_compute_allowed_branch_ids') |
|||
|
|||
@api.depends('company_id') |
|||
def _compute_allowed_branch_ids(self): |
|||
for po in self: |
|||
po.allowed_branch_ids = self.env.user.branch_ids.ids |
|||
|
|||
@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,75 @@ |
|||
# -*- 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, |
|||
help='Leave this field empty if the partner is' |
|||
' shared between all branches' |
|||
) |
|||
allowed_branch_ids = fields.Many2many('res.branch', store=True, |
|||
string="Branches", |
|||
compute='_compute_allowed_branch_ids') |
|||
|
|||
@api.depends('company_id') |
|||
def _compute_allowed_branch_ids(self): |
|||
for po in self: |
|||
po.allowed_branch_ids = self.env.user.branch_ids.ids |
|||
|
|||
@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,177 @@ |
|||
# -*- 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, |
|||
compute='_compute_warehouse_id', store=True, |
|||
readonly=False, precompute=True, |
|||
states={ |
|||
'sale': [('readonly', True)], |
|||
'done': [('readonly', False)], |
|||
'cancel': [('readonly', False)]}, |
|||
check_company=True) |
|||
allowed_branch_ids = fields.Many2many('res.branch', store=True, |
|||
string="Allowed Branches", |
|||
compute='_compute_allowed_branch_ids') |
|||
|
|||
@api.depends('company_id') |
|||
def _compute_allowed_branch_ids(self): |
|||
for so in self: |
|||
so.allowed_branch_ids = self.env.user.branch_ids.ids |
|||
|
|||
@api.depends('company_id') |
|||
def _compute_branch(self): |
|||
for order in self: |
|||
order.branch_id = False |
|||
if len(self.env.user.branch_ids) == 1: |
|||
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,63 @@ |
|||
# -*- 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" |
|||
|
|||
def _get_default_branch_id(self): |
|||
if len(self.env.user.branch_ids) == 1: |
|||
sp_company = self.company_id if self.company_id else self.env.company |
|||
branch_ids = self.env.user.branch_ids |
|||
branch = branch_ids.filtered( |
|||
lambda branch: branch.company_id == sp_company) |
|||
if branch: |
|||
return branch |
|||
else: |
|||
return False |
|||
return False |
|||
|
|||
branch_id = fields.Many2one("res.branch", string='Branch', |
|||
readonly=False, store=True, |
|||
compute="_compute_branch_id", |
|||
default=_get_default_branch_id) |
|||
|
|||
@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,39 @@ |
|||
# -*- 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() + \ |
|||
", spt.branch_id as branch_id" |
|||
|
|||
def _group_by(self): |
|||
"""group by""" |
|||
return super(PurchaseReport, self)._group_by() + \ |
|||
", spt.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 SaleReport(models.Model): |
|||
_inherit = "sale.report" |
|||
|
|||
branch_id = fields.Many2one('res.branch', readonly=True) |
|||
|
|||
def _select_additional_fields(self): |
|||
res = super()._select_additional_fields() |
|||
res['branch_id'] = "s.branch_id" |
|||
return res |
|||
|
|||
def _group_by_sale(self): |
|||
res = super()._group_by_sale() |
|||
res += """, |
|||
s.branch_id""" |
|||
return res |
@ -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: 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: 1.5 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 2.1 KiB |
After Width: | Height: | Size: 4.4 KiB |
After Width: | Height: | Size: 589 B |
After Width: | Height: | Size: 3.4 KiB |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 2.3 KiB |
After Width: | Height: | Size: 967 B |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 3.8 KiB |
After Width: | Height: | Size: 5.0 KiB |
After Width: | Height: | Size: 60 KiB |
After Width: | Height: | Size: 56 KiB |
After Width: | Height: | Size: 56 KiB |
After Width: | Height: | Size: 59 KiB |
After Width: | Height: | Size: 1.8 MiB |
After Width: | Height: | Size: 57 KiB |
After Width: | Height: | Size: 527 KiB |
After Width: | Height: | Size: 52 KiB |
After Width: | Height: | Size: 103 KiB |
After Width: | Height: | Size: 125 KiB |
After Width: | Height: | Size: 129 KiB |
After Width: | Height: | Size: 122 KiB |
After Width: | Height: | Size: 116 KiB |
After Width: | Height: | Size: 119 KiB |
After Width: | Height: | Size: 150 KiB |
After Width: | Height: | Size: 138 KiB |
After Width: | Height: | Size: 72 KiB |
After Width: | Height: | Size: 77 KiB |
After Width: | Height: | Size: 71 KiB |
After Width: | Height: | Size: 98 KiB |
After Width: | Height: | Size: 108 KiB |
After Width: | Height: | Size: 90 KiB |
After Width: | Height: | Size: 33 KiB |
@ -0,0 +1,661 @@ |
|||
<div style="background-color: #714B67; min-height: 600px; width: 100%; padding: 15px; position: relative;"> |
|||
<!-- TITLE BAR --> |
|||
<div |
|||
style="border-bottom: 1px solid #875A7B; padding: 15px; display: flex; justify-content: space-between; align-items: center;"> |
|||
<img src="assets/misc/cybrosys-logo.png" width="42" height="42" style="width: 42px; height: 42px;" /> |
|||
<div> |
|||
<div style="color: #7C7BAD; font-size: 14px; font-family: 'Montserrat', sans-serif; font-weight: bold; background-color: white; display: inline-block; padding: 3px 10px; border-radius: 50px;" |
|||
class="mr-2"> |
|||
<i class="fa fa-check mr-1"></i>Community |
|||
</div> |
|||
<div style="color: #875A7B; font-size: 14px; font-family: 'Montserrat', sans-serif; font-weight: bold; background-color: white; display: inline-block; padding: 3px 10px; border-radius: 50px;" |
|||
class="mr-2"> |
|||
<i class="fa fa-check mr-1"></i>Enterprise |
|||
</div> |
|||
<div style="color: #017E84; font-size: 14px; font-family: 'Montserrat', sans-serif; font-weight: bold; background-color: white; display: inline-block; padding: 3px 10px; border-radius: 50px;" |
|||
class="mr-2"> |
|||
<i class="fa fa-check mr-1"></i>Odoo.sh |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<!-- END OF TITLE BAR --> |
|||
|
|||
<!-- APP HERO --> |
|||
<h1 style="color: #FFFFFF; font-weight: bolder; font-size: 50px; text-align: center; margin-top: 50px;">Multi Branch Operations</h1> |
|||
<p style="color:#FFFFFF; padding: 8px 15px; text-align: center; font-size: 24px;"> Multiple Branch Unit Operation Setup for All |
|||
Modules In Odoo</p> |
|||
<!-- END OF APP HERO --> |
|||
<img src="assets/screenshots/hero.gif" |
|||
style="width: 75%; height: auto; position: absolute; margin-left: auto; margin-right: auto; top: 45%; left: 12%; right: auto;" /> |
|||
|
|||
</div> |
|||
|
|||
<!-- NAVIGATION SECTION --> |
|||
<div class="d-flex align-items-center" style="border-bottom: 2px solid #714B67; padding: 15px 0px; margin-top: 300px;"> |
|||
<div class="d-flex justify-content-center align-items-center mr-2" |
|||
style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;"> |
|||
<img src="assets/misc/compass.png" /> |
|||
</div> |
|||
<h2 class="mt-2" style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;">Explore This |
|||
Module</h2> |
|||
</div> |
|||
<div class="row my-4" style="font-family: 'Montserrat', sans-serif;"> |
|||
<div class="col-sm-12 col-md-6 my-3"> |
|||
<a href="#overview"> |
|||
<div class="d-flex justify-content-between align-items-center" |
|||
style="background-color: #f5f5f5; padding: 30px; width: 100%;"> |
|||
<div> |
|||
<span style="color: #714B67; font-size: 24px; font-weight: 500; display: block;">Overview</span> |
|||
<span |
|||
style="color: #714B67; font-size: 16px; font-weight: 400; color:#282F33; display: block;">Learn |
|||
more about this |
|||
module</span> |
|||
</div> |
|||
<img src="assets/misc/right-arrow.png" width="36" height="36" /> |
|||
</div> |
|||
</a> |
|||
</div> |
|||
<div class="col-sm-12 col-md-6 my-3"> |
|||
<a href="#features"> |
|||
<div class="d-flex justify-content-between align-items-center" |
|||
style="background-color: #f5f5f5; padding: 30px; width: 100%;"> |
|||
<div> |
|||
<span style="color: #714B67; font-size: 24px; font-weight: 500; display: block;">Features</span> |
|||
<span |
|||
style="color: #714B67; font-size: 16px; font-weight: 400; color:#282F33; display: block;">View |
|||
features of this |
|||
module</span> |
|||
</div> |
|||
<img src="assets/misc/right-arrow.png" width="36" height="36" /> |
|||
</div> |
|||
</a> |
|||
</div> |
|||
<div class="col-sm-12 col-md-6 my-3"> |
|||
<a href="#screenshots"> |
|||
<div class="d-flex justify-content-between align-items-center" |
|||
style="background-color: #f5f5f5; padding: 30px; width: 100%;"> |
|||
<div> |
|||
<span style="color: #714B67; font-size: 24px; font-weight: 500; display: block;">Screenshots</span> |
|||
<span |
|||
style="color: #714B67; font-size: 16px; font-weight: 400; color:#282F33; display: block;">View |
|||
screenshots for this |
|||
module</span> |
|||
</div> |
|||
<img src="assets/misc/right-arrow.png" width="36" height="36" /> |
|||
</div> |
|||
</a> |
|||
</div> |
|||
</div> |
|||
<!-- END OF NAVIGATION SECTION --> |
|||
|
|||
<!-- OVERVIEW SECTION --> |
|||
<div class="d-flex align-items-center" style="border-bottom: 2px solid #714B67; padding: 15px 0px;" id="overview"> |
|||
<div class="d-flex justify-content-center align-items-center mr-2" |
|||
style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;"> |
|||
<img src="assets/misc/pie-chart.png" /> |
|||
</div> |
|||
<h2 class="mt-2" style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;">Overview |
|||
</h2> |
|||
</div> |
|||
<div class="row" style="font-family: 'Montserrat', sans-serif; font-weight: 400; font-size: 14px; line-height: 200%;"> |
|||
<div class="col-sm-12 py-4"> |
|||
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. |
|||
</div> |
|||
</div> |
|||
<!-- END OF OVERVIEW SECTION --> |
|||
|
|||
<!-- FEATURES SECTION --> |
|||
<div class="d-flex align-items-center" style="border-bottom: 2px solid #714B67; padding: 15px 0px;" id="features"> |
|||
<div class="d-flex justify-content-center align-items-center mr-2" |
|||
style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;"> |
|||
<img src="assets/misc/features.png" /> |
|||
</div> |
|||
<h2 class="mt-2" style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;">Features |
|||
</h2> |
|||
</div> |
|||
<div class="row" style="font-family: 'Montserrat', sans-serif; font-weight: 400; font-size: 14px; line-height: 200%;"> |
|||
<div class="col-sm-12 col-md-6"> |
|||
<div class="d-flex align-items-center" style="margin-top: 40px; margin-bottom: 40px"> |
|||
<img src="assets/misc/check-box.png" class="mr-2" /> |
|||
<span style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">Create Branches for the Company.</span> |
|||
</div> |
|||
<div class="d-flex align-items-center" style="margin-top: 30px; margin-bottom: 30px"> |
|||
<img src="assets/misc/check-box.png" class="mr-2" /> |
|||
<span style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">Branch for User.</span> |
|||
</div> |
|||
<div class="d-flex align-items-center" style="margin-top: 30px; margin-bottom: 30px"> |
|||
<img src="assets/misc/check-box.png" class="mr-2" /> |
|||
<span style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">Branch on Product.</span> |
|||
</div> |
|||
<div class="d-flex align-items-center" style="margin-top: 30px; margin-bottom: 30px"> |
|||
<img src="assets/misc/check-box.png" class="mr-2" /> |
|||
<span style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">Branch on Partner.</span> |
|||
</div> |
|||
<div class="d-flex align-items-center" style="margin-top: 30px; margin-bottom: 30px"> |
|||
<img src="assets/misc/check-box.png" class="mr-2" /> |
|||
<span style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">Branch on Journal.</span> |
|||
</div> |
|||
<div class="d-flex align-items-center" style="margin-top: 30px; margin-bottom: 30px"> |
|||
<img src="assets/misc/check-box.png" class="mr-2" /> |
|||
<span style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">Branch on Account.</span> |
|||
</div> |
|||
<div class="d-flex align-items-center" style="margin-top: 30px; margin-bottom: 30px"> |
|||
<img src="assets/misc/check-box.png" class="mr-2" /> |
|||
<span style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">Branch on Customer Vendor Payments.</span> |
|||
</div> |
|||
<div class="d-flex align-items-center" style="margin-top: 30px; margin-bottom: 30px"> |
|||
<img src="assets/misc/check-box.png" class="mr-2" /> |
|||
<span style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">Branch on Customer Invoice.</span> |
|||
</div> |
|||
<div class="d-flex align-items-center" style="margin-top: 30px; margin-bottom: 30px"> |
|||
<img src="assets/misc/check-box.png" class="mr-2" /> |
|||
<span style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">Branch on Vendor Bill.</span> |
|||
</div> |
|||
<div class="d-flex align-items-center" style="margin-top: 30px; margin-bottom: 30px"> |
|||
<img src="assets/misc/check-box.png" class="mr-2" /> |
|||
<span style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;"> Branch on Warehouse.</span> |
|||
</div> |
|||
<div class="d-flex align-items-center" style="margin-top: 30px; margin-bottom: 30px"> |
|||
<img src="assets/misc/check-box.png" class="mr-2" /> |
|||
<span style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">Branch on Operation Types.</span> |
|||
</div> |
|||
<div class="d-flex align-items-center" style="margin-top: 30px; margin-bottom: 30px"> |
|||
<img src="assets/misc/check-box.png" class="mr-2" /> |
|||
<span style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">Branch on transfer.</span> |
|||
</div> |
|||
<div class="d-flex align-items-center" style="margin-top: 30px; margin-bottom: 30px"> |
|||
<img src="assets/misc/check-box.png" class="mr-2" /> |
|||
<span style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">Branch on Sales flow.</span> |
|||
</div> |
|||
<div class="d-flex align-items-center" style="margin-top: 30px; margin-bottom: 30px"> |
|||
<img src="assets/misc/check-box.png" class="mr-2" /> |
|||
<span style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">Branch on Purchase flow.</span> |
|||
</div> |
|||
<div class="d-flex align-items-center" style="margin-top: 30px; margin-bottom: 30px"> |
|||
<img src="assets/misc/check-box.png" class="mr-2" /> |
|||
<span style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">Branch on Reports.</span> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<!-- END OF FEATURES SECTION --> |
|||
|
|||
<!-- SCREENSHOTS SECTION --> |
|||
<div class="d-flex align-items-center" style="border-bottom: 2px solid #714B67; padding: 15px 0px;" id="screenshots"> |
|||
<div class="d-flex justify-content-center align-items-center mr-2" |
|||
style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;"> |
|||
<img src="assets/misc/pictures.png" /> |
|||
</div> |
|||
<h2 class="mt-2" style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;">Screenshots |
|||
</h2> |
|||
</div> |
|||
<div class="row"> |
|||
<div class="col-sm-12"> |
|||
|
|||
<div style="display: block; margin: 30px auto;"> |
|||
<h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">Branch Creation</h3> |
|||
<p style="font-weight: 400; font-family: 'Montserrat', sans-serif; font-size: 14px;">Administrator can create Branches for the |
|||
company from Settings -> Users & Companies -> Branches -> Create</p> |
|||
<img src="assets/screenshots/mb1.png" class="img-thumbnail"> |
|||
</div> |
|||
|
|||
<div style="display: block; margin: 30px auto;"> |
|||
<h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">Allowed & Default Branch</h3> |
|||
<p style="font-weight: 400; font-family: 'Montserrat', sans-serif; font-size: 14px;">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/mb2.png" class="img-thumbnail"> |
|||
</div> |
|||
|
|||
<div style="display: block; margin: 30px auto;"> |
|||
<h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">Product</h3> |
|||
<p style="font-weight: 400; font-family: 'Montserrat', sans-serif; font-size: 14px;"> 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/mb3.png" class="img-thumbnail"> |
|||
</div> |
|||
<div style="display: block; margin: 30px auto;"> |
|||
<h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">Partners</h3> |
|||
<p style="font-weight: 400; font-family: 'Montserrat', sans-serif; font-size: 14px;">Branch can be set for partners</p> |
|||
<img src="assets/screenshots/mb4.png" class="img-thumbnail"> |
|||
</div> |
|||
<div style="display: block; margin: 30px auto;"> |
|||
<h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">Journal</h3> |
|||
<p style="font-weight: 400; font-family: 'Montserrat', sans-serif; font-size: 14px;">Branch for Journals</p> |
|||
<img src="assets/screenshots/mb5.png" class="img-thumbnail"> |
|||
</div> |
|||
<div style="display: block; margin: 30px auto;"> |
|||
<h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">Chart of Accounts</h3> |
|||
<p style="font-weight: 400; font-family: 'Montserrat', sans-serif; font-size: 14px;">Branch for Chart of Accounts</p> |
|||
<img src="assets/screenshots/mb6.png" class="img-thumbnail"> |
|||
</div> |
|||
<div style="display: block; margin: 30px auto;"> |
|||
<h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">Warehouse</h3> |
|||
<p style="font-weight: 400; font-family: 'Montserrat', sans-serif; font-size: 14px;">Branch can be set for Warehouse</p> |
|||
<img src="assets/screenshots/mb7.png" class="img-thumbnail"> |
|||
</div> |
|||
<div style="display: block; margin: 30px auto;"> |
|||
<h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">Operation Types</h3> |
|||
<p style="font-weight: 400; font-family: 'Montserrat', sans-serif; font-size: 14px;"> 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/mb8.png" class="img-thumbnail"> |
|||
</div> |
|||
<div style="display: block; margin: 30px auto;"> |
|||
<h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">Purchase Order</h3> |
|||
<p style="font-weight: 400; font-family: 'Montserrat', sans-serif; font-size: 14px;">For the newly created PO branch will be set based on the user.</p> |
|||
<img src="assets/screenshots/mb9.png" class="img-thumbnail"> |
|||
</div> |
|||
<div style="display: block; margin: 30px auto;"> |
|||
<h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">Receipt</h3> |
|||
<p style="font-weight: 400; font-family: 'Montserrat', sans-serif; font-size: 14px;">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-thumbnail"> |
|||
</div> |
|||
<div style="display: block; margin: 30px auto;"> |
|||
<h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">Bill</h3> |
|||
<p style="font-weight: 400; font-family: 'Montserrat', sans-serif; font-size: 14px;">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-thumbnail"> |
|||
</div> |
|||
<div style="display: block; margin: 30px auto;"> |
|||
<h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">Sale Order</h3> |
|||
<p style="font-weight: 400; font-family: 'Montserrat', sans-serif; font-size: 14px;"> 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-thumbnail"> |
|||
</div> |
|||
<div style="display: block; margin: 30px auto;"> |
|||
<h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">Delivery Order</h3> |
|||
<p style="font-weight: 400; font-family: 'Montserrat', sans-serif; font-size: 14px;"> 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-thumbnail"> |
|||
</div> |
|||
<div style="display: block; margin: 30px auto;"> |
|||
<h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">Invoice</h3> |
|||
<p style="font-weight: 400; font-family: 'Montserrat', sans-serif; font-size: 14px;"> 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 inv</p> |
|||
<img src="assets/screenshots/mb14.png" class="img-thumbnail"> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<!-- END OF SCREENSHOTS SECTION --> |
|||
|
|||
<!-- RELATED PRODUCTS --> |
|||
<div class="d-flex align-items-center" style="border-bottom: 2px solid #714B67; padding: 15px 0px;"> |
|||
<div class="d-flex justify-content-center align-items-center mr-2" |
|||
style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;"> |
|||
<img src="assets/misc/categories.png" /> |
|||
</div> |
|||
<h2 class="mt-2" style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;">Related |
|||
Products |
|||
</h2> |
|||
</div> |
|||
<div class="row"> |
|||
<div class="col-sm-12"> |
|||
<div id="demo1" class="row carousel slide" data-ride="carousel"> |
|||
<!-- The slideshow --> |
|||
<div class="carousel-inner" style="padding: 30px;"> |
|||
<div class="carousel-item" style="min-height: 198.656px;"> |
|||
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16" style="float:left"> |
|||
<a href="https://apps.odoo.com/apps/modules/15.0/dynamic_accounts_report/" target="_blank"> |
|||
<div style="border-radius:10px"> |
|||
<img class="img img-responsive center-block" style="border-radius: 0px;" |
|||
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/15.0/custom_gantt_view/" target="_blank"> |
|||
<div style="border-radius:10px"> |
|||
<img class="img img-responsive center-block" style="border-radius: 0px;" |
|||
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/15.0/project_custom_gantt/" target="_blank"> |
|||
<div style="border-radius:10px"> |
|||
<img class="img img-responsive center-block" style="border-radius: 0px;" |
|||
src="assets/modules/3.png"> |
|||
</div> |
|||
</a> |
|||
</div> |
|||
</div> |
|||
<div class="carousel-item active" style="min-height: 198.656px;"> |
|||
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16" style="float:left"> |
|||
<a href="https://apps.odoo.com/apps/modules/15.0/account_reports_xlsx/" target="_blank"> |
|||
<div style="border-radius:10px"> |
|||
<img class="img img-responsive center-block" style="border-radius: 0px;" |
|||
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/15.0/base_accounting_kit/" target="_blank"> |
|||
<div style="border-radius:10px"> |
|||
<img class="img img-responsive center-block" style="border-radius: 0px;" |
|||
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/15.0/hr_payroll_community/" target="_blank"> |
|||
<div style="border-radius:10px"> |
|||
<img class="img img-responsive center-block" style="border-radius: 0px;" |
|||
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="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="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 RELATED PRODUCTS --> |
|||
|
|||
<!-- OUR SERVICES --> |
|||
|
|||
<div class="d-flex align-items-center" style="border-bottom: 2px solid #714B67; padding: 15px 0px;"> |
|||
<div class="d-flex justify-content-center align-items-center mr-2" |
|||
style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;"> |
|||
<img src="assets/misc/star.png" /> |
|||
</div> |
|||
<h2 class="mt-2" style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;">Our Services |
|||
</h2> |
|||
</div> |
|||
|
|||
<div class="container my-5"> |
|||
<div class="row"> |
|||
<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> |
|||
|
|||
</div> |
|||
|
|||
<!-- END OF END OF OUR SERVICES --> |
|||
|
|||
<!-- OUR INDUSTRIES --> |
|||
|
|||
<div class="d-flex align-items-center" style="border-bottom: 2px solid #714B67; padding: 15px 0px;"> |
|||
<div class="d-flex justify-content-center align-items-center mr-2" |
|||
style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;"> |
|||
<img src="assets/misc/corporate.png" /> |
|||
</div> |
|||
<h2 class="mt-2" style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;">Our |
|||
Industries |
|||
</h2> |
|||
</div> |
|||
|
|||
<div class="container my-5"> |
|||
<div class="row"> |
|||
<div class="col-lg-3"> |
|||
<div class="my-4 d-flex flex-column justify-content-center" |
|||
style="background-color: #f6f8f9 !important; border-radius: 0px; 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: 0px; 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: 0px; 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: 0px; 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: 0px; 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: 0px; 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: 0px; 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: 0px; 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> |
|||
</div> |
|||
|
|||
<!-- END OF END OF OUR INDUSTRIES --> |
|||
|
|||
<!-- SUPPORT --> |
|||
<div class="d-flex align-items-center" style="border-bottom: 2px solid #714B67; padding: 15px 0px;"> |
|||
<div class="d-flex justify-content-center align-items-center mr-2" |
|||
style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;"> |
|||
<img src="assets/misc/customer-support.png" /> |
|||
</div> |
|||
<h2 class="mt-2" style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;">Support |
|||
</h2> |
|||
</div> |
|||
<div class="container mt-5"> |
|||
<div class="row"> |
|||
<div class="col-sm-12 col-md-6"> |
|||
<div style="background-color: #F6F8F9; padding: 30px; display: flex; align-items: center;"> |
|||
<div class="mr-4" |
|||
style="background-color: #714B67; display: inline-block; height: 70px; width: 70px; display: flex; align-items: center; justify-content: center;"> |
|||
<img src="assets/misc/support.png" height="48" width="48" style="width: 42px; height: 42px;" /> |
|||
</div> |
|||
<div> |
|||
<h4>Need Help?</h4> |
|||
<p style="line-height: 100%;">Got questions or need help? Get in touch.</p> |
|||
<a href="mailto:odoo@cybrosys.com"> |
|||
<p style="font-weight: 400; font-size: 28px; line-height: 80%; color: #714B67;"> |
|||
odoo@cybrosys.com</p> |
|||
</a> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="col-sm-12 col-md-6"> |
|||
<div style="background-color: #F6F8F9; padding: 30px; display: flex; align-items: center;"> |
|||
<div class="mr-4" |
|||
style="background-color: #2AC44D; display: inline-block; height: 70px; width: 70px; display: flex; align-items: center; justify-content: center;"> |
|||
<img src="assets/misc/whatsapp.png" height="52" width="52" style="width: 52px; height: 52px;" /> |
|||
</div> |
|||
<div> |
|||
<h4>WhatsApp</h4> |
|||
<p style="line-height: 100%;">Say hi to us on WhatsApp!</p> |
|||
<a href="https://api.whatsapp.com/send?phone=918606827707"> |
|||
<p style="font-weight: 400; font-size: 28px; line-height: 80%; color: #714B67;">+91 86068 |
|||
27707</p> |
|||
</a> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="row"> |
|||
<div class="col-sm-12 my-5 d-flex justify-content-center align-items-center"> |
|||
<img src="assets/misc/logo.png" width="144" height="31" |
|||
style="width:144px; height: 31px; margin-top: 40px;" /> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<!-- END OF SUPPORT --> |
@ -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"> |
|||
<field name="country_code" position="before"> |
|||
<field name="branch_id" options="{'no_create': True}"/> |
|||
</field> |
|||
</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,84 @@ |
|||
<?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="attributes"> |
|||
<attribute name="domain">[('deprecated', '=', False), ('account_type', 'not in', ('asset_receivable', 'liability_payable')), ('company_id', '=', parent.company_id), ('is_off_balance', '=', False), '|', ('branch_id', '=', parent.branch_id),('branch_id', '=', False)]</attribute> |
|||
</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,41 @@ |
|||
<?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="//group//field[@name='journal_id']" position="after"> |
|||
<field name="branch_id" options="{'no_create': True}" |
|||
attrs="{'readonly': [('state', '!=', 'draft')]}"/> |
|||
</xpath> |
|||
<xpath expr="//field[@name='journal_id']" position="attributes"> |
|||
<attribute name="domain">[('id', 'in', available_journal_ids), '|', ('branch_id', '=', branch_id), ('branch_id', '=', False)]</attribute> |
|||
</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="partner_id" position="after"> |
|||
<field name="branch_id" optional="show"/> |
|||
</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,39 @@ |
|||
<?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="//page//group//field[@name='company_id']" position="after"> |
|||
<field name="branch_id" options="{'no_create': True}"/> |
|||
</xpath> |
|||
<xpath expr="//page//group//field[@name='allowed_journal_ids']" position="attributes"> |
|||
<attribute name="domain">[('company_id','=',company_id), '|', ('branch_id', '=', branch_id), ('branch_id', '=', False)]</attribute> |
|||
</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,16 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<odoo> |
|||
<data> |
|||
<!-- view common to both template and product --> |
|||
<record id="view_template_branch_form" model="ir.ui.view"> |
|||
<field name="name">product.template.branch.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="cost_currency_id" position="before"> |
|||
<field name="branch_id"/> |
|||
</field> |
|||
</field> |
|||
</record> |
|||
</data> |
|||
</odoo> |
@ -0,0 +1,50 @@ |
|||
<?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), ('id', 'in', allowed_branch_ids)]" required="1"/> |
|||
<field name="allowed_branch_ids" invisible="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,230 @@ |
|||
<?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_bold" inherit_id="web.external_layout_bold"> |
|||
<xpath expr="//div[@name='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"> |
|||
<div class="col-5 offset-1" name="company_address"> |
|||
<ul class="list-unstyled"> |
|||
<strong><li t-if="company.name"><span t-field="company.name"/></li></strong> |
|||
<li t-if="forced_vat or company.vat"> |
|||
<t t-esc="company.country_id.vat_label or 'Tax ID'"/>: |
|||
<span t-if="forced_vat" t-esc="forced_vat"/> |
|||
<span t-else="" t-field="company.vat"/> |
|||
</li> |
|||
<li t-if="branch.name"><span t-field="branch.name"/></li> |
|||
<li t-if="branch.phone">Tel: <span class="o_force_ltr" t-field="branch.phone"/></li> |
|||
<li t-if="branch.email"><span t-field="branch.email"/></li> |
|||
<li t-if="branch.website"><span t-field="branch.website"/></li> |
|||
</ul> |
|||
</div> |
|||
</t> |
|||
<t t-else="else"> |
|||
<div class="col-5 offset-1" name="company_address"> |
|||
<ul class="list-unstyled"> |
|||
<strong><li t-if="company.name"><span t-field="company.name"/></li></strong> |
|||
<li t-if="forced_vat or company.vat"> |
|||
<t t-esc="company.country_id.vat_label or 'Tax ID'"/>: |
|||
<span t-if="forced_vat" t-esc="forced_vat"/> |
|||
<span t-else="" t-field="company.vat"/> |
|||
</li> |
|||
<li t-if="company.phone">Tel: <span class="o_force_ltr" t-field="company.phone"/></li> |
|||
<li t-if="company.email"><span t-field="company.email"/></li> |
|||
<li t-if="company.website"><span t-field="company.website"/></li> |
|||
</ul> |
|||
</div> |
|||
</t> |
|||
</t> |
|||
<t t-else="else"> |
|||
<div class="col-5 offset-1" name="company_address"> |
|||
<ul class="list-unstyled"> |
|||
<strong><li t-if="company.name"><span t-field="company.name"/></li></strong> |
|||
<li t-if="forced_vat or company.vat"> |
|||
<t t-esc="company.country_id.vat_label or 'Tax ID'"/>: |
|||
<span t-if="forced_vat" t-esc="forced_vat"/> |
|||
<span t-else="" t-field="company.vat"/> |
|||
</li> |
|||
<li t-if="company.phone">Tel: <span class="o_force_ltr" t-field="company.phone"/></li> |
|||
<li t-if="company.email"><span t-field="company.email"/></li> |
|||
<li t-if="company.website"><span t-field="company.website"/></li> |
|||
</ul> |
|||
</div> |
|||
</t> |
|||
</xpath> |
|||
<xpath expr="//span[@t-field='company.report_footer']" position="replace"> |
|||
<t t-if="branch"> |
|||
<t class="list-inline mb4" t-if="branch.phone or branch.email or branch.website"> |
|||
<span t-if="branch.phone" t-field="branch.phone"/><br/> |
|||
<span t-if="branch.email" t-field="branch.email"/><br/> |
|||
<span t-if="branch.website" t-field="branch.website"/> |
|||
</t> |
|||
<t t-else="else"> |
|||
<div t-field="company.report_footer"/> |
|||
</t> |
|||
</t> |
|||
<t t-else="else"> |
|||
<div t-field="company.report_footer"/> |
|||
</t> |
|||
</xpath> |
|||
</template> |
|||
|
|||
<template id="branch_external_layout_boxed" inherit_id="web.external_layout_boxed"> |
|||
<xpath expr="//div[@name='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 t-if="company.company_details" t-field="company.company_details"></span> |
|||
</div> |
|||
</t> |
|||
</t> |
|||
<t t-else="else"> |
|||
<div name="company_address" class="float-right mb4"> |
|||
<span t-if="company.company_details" t-field="company.company_details"></span> |
|||
</div> |
|||
</t> |
|||
</xpath> |
|||
<xpath expr="//div[hasclass('text-center')]" position="replace"> |
|||
<t t-if="branch"> |
|||
<t class="list-inline mb4" t-if="branch.phone or branch.email or branch.website"> |
|||
<span t-if="branch.phone" t-field="branch.phone"/> |
|||
<span t-if="branch.email" t-field="branch.email"/> |
|||
<span t-if="branch.website" t-field="branch.website"/> |
|||
</t> |
|||
<t t-else="else"> |
|||
<ul class="list-inline mb4"> |
|||
<div t-field="company.report_footer"/> |
|||
</ul> |
|||
</t> |
|||
</t> |
|||
<t t-else="else"> |
|||
<ul class="list-inline mb4"> |
|||
<div t-field="company.report_footer"/> |
|||
</ul> |
|||
</t> |
|||
<div t-if="report_type == 'pdf'"> |
|||
Page: <span class="page"/> / <span class="topage"/> |
|||
</div> |
|||
</xpath> |
|||
</template> |
|||
|
|||
<template id="branch_external_layout_striped" inherit_id="web.external_layout_striped"> |
|||
<xpath expr="//div[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"> |
|||
<div class="float-left company_address"><br/><br/> |
|||
<span style="padding-left:0px" t-if="branch.street" t-field="branch.street"/> |
|||
<span t-if="branch.street2" t-field="branch.street2"/> |
|||
<span t-if="branch.city" t-field="branch.city"/>, |
|||
<span t-if="branch.zip" t-field="branch.zip"/> |
|||
<span t-if="branch.state_id" t-field="branch.state_id"/> |
|||
<span t-if="branch.country_id" t-field="branch.country_id"/> |
|||
</div> |
|||
</t> |
|||
<t t-else="else"> |
|||
<div class="float-left company_address"> |
|||
<span t-if="company.company_details" t-field="company.company_details"></span> |
|||
</div> |
|||
</t> |
|||
</t> |
|||
<t t-else="else"> |
|||
<div class="float-left company_address"> |
|||
<span t-if="company.company_details" t-field="company.company_details"></span> |
|||
</div> |
|||
</t> |
|||
</xpath> |
|||
<xpath expr="//ul[hasclass('list-inline')]" position="replace"> |
|||
<t t-if="branch"> |
|||
<t class="list-inline mb4" t-if="branch.phone or branch.email or branch.website"> |
|||
<span t-if="branch.phone" t-field="branch.phone"/> |
|||
<span t-if="branch.email" t-field="branch.email"/> |
|||
<span t-if="branch.website" t-field="branch.website"/> |
|||
</t> |
|||
<t t-else="else"> |
|||
<ul class="list-inline mb4"> |
|||
<div t-field="company.report_footer"/> |
|||
</ul> |
|||
</t> |
|||
</t> |
|||
<t t-else="else"> |
|||
<ul class="list-inline mb4"> |
|||
<div t-field="company.report_footer"/> |
|||
</ul> |
|||
</t> |
|||
</xpath> |
|||
</template> |
|||
|
|||
<template id="branch_external_layout_standard" inherit_id="web.external_layout_standard"> |
|||
<xpath expr="//div[@name='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"> |
|||
<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"> |
|||
<span t-if="company.company_details" t-field="company.company_details"></span> |
|||
</div> |
|||
</t> |
|||
|
|||
</t> |
|||
<t t-else="else"> |
|||
<div class="col-6" name="company_address"> |
|||
<span t-if="company.company_details" t-field="company.company_details"></span> |
|||
</div> |
|||
</t> |
|||
</xpath> |
|||
<xpath expr="//ul[hasclass('list-inline')]" position="replace"> |
|||
<t t-if="branch"> |
|||
<t class="list-inline mb4" t-if="branch.phone or branch.email or branch.website"> |
|||
<span t-if="branch.phone" t-field="branch.phone"/> |
|||
<span t-if="branch.email" t-field="branch.email"/> |
|||
<span t-if="branch.website" t-field="branch.website"/> |
|||
</t> |
|||
<t t-else="else"> |
|||
<ul class="list-inline mb4"> |
|||
<div t-field="company.report_footer"/> |
|||
</ul> |
|||
</t> |
|||
</t> |
|||
<t t-else="else"> |
|||
<ul class="list-inline mb4"> |
|||
<div t-field="company.report_footer"/> |
|||
</ul> |
|||
</t> |
|||
</xpath> |
|||
</template> |
|||
</odoo> |
@ -0,0 +1,17 @@ |
|||
<?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), ('id', 'in', allowed_branch_ids)]" attrs="{'readonly': [('parent_id', '!=', False)]}" |
|||
force_save="1"/> |
|||
<field name="allowed_branch_ids" invisible="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,52 @@ |
|||
<?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), ('id', 'in', allowed_branch_ids)]" required="1"/> |
|||
<field name="allowed_branch_ids" invisible="1"/> |
|||
</xpath> |
|||
<xpath expr="//page[@name='other_information']//field[@name='warehouse_id']" position="attributes"> |
|||
<attribute name="domain">['|', ('branch_id', '=', branch_id), ('branch_id', '=', False)]</attribute> |
|||
</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,41 @@ |
|||
<?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="attributes"> |
|||
<attribute name="domain">['|', ('branch_id', '=', branch_id), ('branch_id', '=', False)]</attribute> |
|||
</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,66 @@ |
|||
# -*- 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 = self.env['account.journal'].search( |
|||
domain, limit=1) |
|||
if not journal: |
|||
domain = [ |
|||
('type', 'in', ('bank', 'cash')), |
|||
('branch_id', '=', False), |
|||
] |
|||
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, batch_result): |
|||
vals = super()._create_payment_vals_from_wizard(batch_result) |
|||
vals.update({'branch_id': self.line_ids.move_id[0].branch_id.id}) |
|||
return vals |