@ -0,0 +1,23 @@ |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################## |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# Copyright (C) 2018-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
|||
# Author: Fasluca(<faslu@cybrosys.in>) |
|||
# you can modify it under the terms of the GNU AFFERO |
|||
# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. |
|||
# |
|||
# It is forbidden to publish, distribute, sublicense, or sell copies |
|||
# of the Software or modified copies of the Software. |
|||
# |
|||
# This program is distributed in the hope that it will be useful, |
|||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. |
|||
# |
|||
# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE |
|||
# GENERAL PUBLIC LICENSE (AGPL v3) along with this program. |
|||
# If not, see <http://www.gnu.org/licenses/>. |
|||
# |
|||
############################################################################## |
|||
from . import models |
@ -0,0 +1,41 @@ |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################## |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# Copyright (C) 2018-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
|||
# Author: Fasluca(<faslu@cybrosys.in>) |
|||
# you can modify it under the terms of the GNU AFFERO |
|||
# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. |
|||
# |
|||
# It is forbidden to publish, distribute, sublicense, or sell copies |
|||
# of the Software or modified copies of the Software. |
|||
# |
|||
# This program is distributed in the hope that it will be useful, |
|||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. |
|||
# |
|||
# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE |
|||
# GENERAL PUBLIC LICENSE (AGPL v3) along with this program. |
|||
# If not, see <http://www.gnu.org/licenses/>. |
|||
# |
|||
############################################################################## |
|||
{ |
|||
'name': 'PDC Management', |
|||
'version': '12.0.1.0', |
|||
'author': 'Cybrosys Techno Solutions', |
|||
'company': 'Cybrosys Techno Solutions', |
|||
'website': 'http://www.cybrosys.com', |
|||
'category': 'Accounting', |
|||
'summary': 'Extension on Cheques to handle Post Dated Cheques', |
|||
'description': """ Extension on Cheques to handle Post Dated Cheques """, |
|||
'depends': ['account_check_printing'], |
|||
'data': [ |
|||
'data/account_pdc_data.xml', |
|||
'views/account_payment_view.xml', |
|||
], |
|||
'images': ['static/description/pdc_banner.jpg'], |
|||
'license': 'LGPL-3', |
|||
'installable': True, |
|||
'auto_install': False, |
|||
} |
@ -0,0 +1,19 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<odoo> |
|||
<data noupdate="1"> |
|||
|
|||
<record id="account_payment_method_pdc_in" model="account.payment.method"> |
|||
<field name="name">PDC</field> |
|||
<field name="code">pdc</field> |
|||
<field name="payment_type">inbound</field> |
|||
</record> |
|||
<record id="account_payment_method_pdc_out" model="account.payment.method"> |
|||
<field name="name">PDC</field> |
|||
<field name="code">pdc</field> |
|||
<field name="payment_type">outbound</field> |
|||
</record> |
|||
|
|||
<!--<function model="account.journal" name="_enable_check_printing_on_bank_journals"/>--> |
|||
|
|||
</data> |
|||
</odoo> |
@ -0,0 +1,25 @@ |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################## |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# Copyright (C) 2018-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
|||
# Author: Fasluca(<faslu@cybrosys.in>) |
|||
# you can modify it under the terms of the GNU AFFERO |
|||
# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. |
|||
# |
|||
# It is forbidden to publish, distribute, sublicense, or sell copies |
|||
# of the Software or modified copies of the Software. |
|||
# |
|||
# This program is distributed in the hope that it will be useful, |
|||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. |
|||
# |
|||
# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE |
|||
# GENERAL PUBLIC LICENSE (AGPL v3) along with this program. |
|||
# If not, see <http://www.gnu.org/licenses/>. |
|||
# |
|||
############################################################################## |
|||
|
|||
from . import account_journal |
|||
from . import account_payment |
@ -0,0 +1,49 @@ |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################## |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# Copyright (C) 2018-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
|||
# Author: Fasluca(<faslu@cybrosys.in>) |
|||
# you can modify it under the terms of the GNU AFFERO |
|||
# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. |
|||
# |
|||
# It is forbidden to publish, distribute, sublicense, or sell copies |
|||
# of the Software or modified copies of the Software. |
|||
# |
|||
# This program is distributed in the hope that it will be useful, |
|||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. |
|||
# |
|||
# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE |
|||
# GENERAL PUBLIC LICENSE (AGPL v3) along with this program. |
|||
# If not, see <http://www.gnu.org/licenses/>. |
|||
# |
|||
############################################################################## |
|||
|
|||
from odoo import models, api, _ |
|||
|
|||
|
|||
class AccountJournal(models.Model): |
|||
_inherit = "account.journal" |
|||
|
|||
@api.one |
|||
@api.depends('outbound_payment_method_ids') |
|||
def _compute_check_printing_payment_method_selected(self): |
|||
self.check_printing_payment_method_selected = any( |
|||
pm.code in ['check_printing', 'pdc'] for pm in self.outbound_payment_method_ids) |
|||
|
|||
@api.model |
|||
def _enable_pdc_on_bank_journals(self): |
|||
""" Enables check printing payment method and add a check sequence on bank journals. |
|||
Called upon module installation via data file. |
|||
""" |
|||
pdcin = self.env.ref('account_pdc.account_payment_method_pdc_in') |
|||
pdcout = self.env.ref('account_pdc.account_payment_method_pdc_out') |
|||
bank_journals = self.search([('type', '=', 'bank')]) |
|||
for bank_journal in bank_journals: |
|||
# bank_journal._create_check_sequence() |
|||
bank_journal.write({ |
|||
'inbound_payment_method_ids': [(4, pdcin.id, None)], |
|||
'outbound_payment_method_ids': [(4, pdcout.id, None)], |
|||
}) |
@ -0,0 +1,110 @@ |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################## |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# Copyright (C) 2018-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
|||
# Author: Fasluca(<faslu@cybrosys.in>) |
|||
# you can modify it under the terms of the GNU AFFERO |
|||
# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. |
|||
# |
|||
# It is forbidden to publish, distribute, sublicense, or sell copies |
|||
# of the Software or modified copies of the Software. |
|||
# |
|||
# This program is distributed in the hope that it will be useful, |
|||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. |
|||
# |
|||
# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE |
|||
# GENERAL PUBLIC LICENSE (AGPL v3) along with this program. |
|||
# If not, see <http://www.gnu.org/licenses/>. |
|||
# |
|||
############################################################################## |
|||
|
|||
from odoo import models, fields, api, _ |
|||
from odoo.exceptions import UserError |
|||
|
|||
|
|||
class AccountRegisterPayments(models.TransientModel): |
|||
_inherit = "account.register.payments" |
|||
|
|||
bank_reference = fields.Char(copy=False) |
|||
cheque_reference = fields.Char(copy=False) |
|||
effective_date = fields.Date('Effective Date', help='Effective date of PDC', copy=False, default=False) |
|||
|
|||
def get_payment_vals(self): |
|||
res = super(AccountRegisterPayments, self).get_payment_vals() |
|||
if self.payment_method_id == self.env.ref('account_check_printing.account_payment_method_check'): |
|||
res.update({ |
|||
'check_amount_in_words': self.check_amount_in_words, |
|||
'check_manual_sequencing': self.check_manual_sequencing, |
|||
'effective_date': self.effective_date, |
|||
}) |
|||
return res |
|||
|
|||
|
|||
class AccountPayment(models.Model): |
|||
_inherit = "account.payment" |
|||
|
|||
bank_reference = fields.Char(copy=False) |
|||
cheque_reference = fields.Char(copy=False) |
|||
effective_date = fields.Date('Effective Date', help='Effective date of PDC', copy=False, default=False) |
|||
|
|||
@api.multi |
|||
def print_checks(self): |
|||
""" Check that the recordset is valid, set the payments state to sent and call print_checks() """ |
|||
# Since this method can be called via a client_action_multi, we need to make sure the received records are what we expect |
|||
self = self.filtered(lambda r: r.payment_method_id.code in ['check_printing', 'pdc'] and r.state != 'reconciled') |
|||
|
|||
if len(self) == 0: |
|||
raise UserError(_("Payments to print as a checks must have 'Check' or 'PDC' selected as payment method and " |
|||
"not have already been reconciled")) |
|||
if any(payment.journal_id != self[0].journal_id for payment in self): |
|||
raise UserError(_("In order to print multiple checks at once, they must belong to the same bank journal.")) |
|||
|
|||
if not self[0].journal_id.check_manual_sequencing: |
|||
# The wizard asks for the number printed on the first pre-printed check |
|||
# so payments are attributed the number of the check the'll be printed on. |
|||
last_printed_check = self.search([ |
|||
('journal_id', '=', self[0].journal_id.id), |
|||
('check_number', '!=', 0)], order="check_number desc", limit=1) |
|||
next_check_number = last_printed_check and last_printed_check.check_number + 1 or 1 |
|||
return { |
|||
'name': _('Print Pre-numbered Checks'), |
|||
'type': 'ir.actions.act_window', |
|||
'res_model': 'print.prenumbered.checks', |
|||
'view_type': 'form', |
|||
'view_mode': 'form', |
|||
'target': 'new', |
|||
'context': { |
|||
'payment_ids': self.ids, |
|||
'default_next_check_number': next_check_number, |
|||
} |
|||
} |
|||
else: |
|||
self.filtered(lambda r: r.state == 'draft').post() |
|||
self.write({'state': 'sent'}) |
|||
return self.do_print_checks() |
|||
|
|||
|
|||
def _get_move_vals(self, journal=None): |
|||
""" Return dict to create the payment move |
|||
""" |
|||
journal = journal or self.journal_id |
|||
if not journal.sequence_id: |
|||
raise UserError(_('Configuration Error !'), |
|||
_('The journal %s does not have a sequence, please specify one.') % journal.name) |
|||
if not journal.sequence_id.active: |
|||
raise UserError(_('Configuration Error !'), _('The sequence of journal %s is deactivated.') % journal.name) |
|||
name = self.move_name or journal.with_context(ir_sequence_date=self.payment_date).sequence_id.next_by_id() |
|||
if self.payment_method_code =='pdc': |
|||
date = self.effective_date |
|||
else: |
|||
date = self.payment_date |
|||
return { |
|||
'name': name, |
|||
'date': date, |
|||
'ref': self.communication or '', |
|||
'company_id': self.company_id.id, |
|||
'journal_id': journal.id, |
|||
} |
After Width: | Height: | Size: 50 KiB |
After Width: | Height: | Size: 8.6 KiB |
@ -0,0 +1,91 @@ |
|||
<section class="oe_container"> |
|||
<div class="oe_row oe_spaced"> |
|||
<div class="oe_span12"> |
|||
<h2 class="oe_slogan">PDC Management</h2> |
|||
<h4 class="oe_slogan">Cybrosys Techno Solutions, www.cybrosys.com</h4> |
|||
<h3 class="oe_slogan">...A simple way to handle Post Dated Cheques...</h3> |
|||
</div> |
|||
</div> |
|||
</section> |
|||
|
|||
<section class="oe_container oe_dark"> |
|||
<div class="oe_row oe_spaced"> |
|||
<div class="oe_span12"> |
|||
<h3 class="oe_slogan">Configuration</h3> |
|||
</div> |
|||
<h5 class="oe_slogan"><b>Select PDC on Journal</b></h5> |
|||
<div class="col-md-12"> |
|||
<div class="oe_row_img oe_demo oe_picture oe_screenshot"> |
|||
<img src="pdc_journal.png"> |
|||
</div> |
|||
</div> |
|||
<div class="oe_span12"> |
|||
<p>As shown here, You have to select PDC to enable the PDC payment.This is only available with Journal of type 'Bank'</p> |
|||
</div> |
|||
</div> |
|||
</section> |
|||
|
|||
<section class="oe_container"> |
|||
<div class="oe_row oe_spaced"> |
|||
<div class="oe_span12"> |
|||
<h3 class="oe_slogan">At The Time of Payment You Will Have</h3> |
|||
</div> |
|||
<div class="col-md-12"> |
|||
<div class="oe_row_img oe_demo oe_picture oe_screenshot"> |
|||
<img src="pdc_payment.png"> |
|||
</div> |
|||
</div> |
|||
<div class="oe_span12"> |
|||
<p class="oe_mt32"> |
|||
<p>Payment form have two extra fields to put Bank and Cheque Detail.</p> |
|||
</p> |
|||
</div> |
|||
</div> |
|||
<div class="oe_row oe_spaced"> |
|||
|
|||
<div class="col-md-12"> |
|||
<div class="oe_row_img oe_demo oe_picture oe_screenshot"> |
|||
<img src="pdc_selected_payment.png"> |
|||
</div> |
|||
</div> |
|||
<div class="oe_span12"> |
|||
<p class="oe_mt32"> |
|||
<p>When you select PDC, You have to put 'effective date' of PDC.</p> |
|||
</p> |
|||
</div> |
|||
</div> |
|||
</section> |
|||
|
|||
<section class="oe_container"> |
|||
<h2 class="oe_slogan" style="margin-top:20px;" >Need Any Help?</h2> |
|||
<div class="oe_slogan" style="margin-top:10px !important;"> |
|||
<div> |
|||
<a class="btn btn-primary btn-lg mt8" |
|||
style="color: #FFFFFF !important;border-radius: 0;" href="https://www.cybrosys.com"><i |
|||
class="fa fa-envelope"></i> Email </a> <a |
|||
class="btn btn-primary btn-lg mt8" style="color: #FFFFFF !important;border-radius: 0;" |
|||
href="https://www.cybrosys.com/contact/"><i |
|||
class="fa fa-phone"></i> Contact Us </a> <a |
|||
class="btn btn-primary btn-lg mt8" style="color: #FFFFFF !important;border-radius: 0;" |
|||
href="https://www.cybrosys.com/odoo-customization-and-installation/"><i |
|||
class="fa fa-check-square"></i> Request Customization </a> |
|||
</div> |
|||
<br> |
|||
<img src="cybro_logo.png" style="width: 190px; margin-bottom: 20px;" class="center-block"> |
|||
<div> |
|||
<a href="https://twitter.com/cybrosys" target="_blank"><i class="fa fa-2x fa-twitter" style="color:white;background: #00a0d1;width:35px;"></i></a></td> |
|||
<a href="https://www.linkedin.com/company/cybrosys-technologies-pvt-ltd" target="_blank"><i class="fa fa-2x fa-linkedin" style="color:white;background: #31a3d6;width:35px;padding-left: 3px;"></i></a></td> |
|||
<a href="https://www.facebook.com/cybrosystechnologies" target="_blank"><i class="fa fa-2x fa-facebook" style="color:white;background: #3b5998;width:35px;padding-left: 8px;"></i></a></td> |
|||
<a href="https://plus.google.com/106641282743045431892/about" target="_blank"><i class="fa fa-2x fa-google-plus" style="color:white;background: #c53c2c;width:35px;padding-left: 3px;"></i></a></td> |
|||
<a href="https://in.pinterest.com/cybrosys" target="_blank"><i class="fa fa-2x fa-pinterest" style="color:white;background: #ac0f18;width:35px;padding-left: 3px;"></i></a></td> |
|||
</div> |
|||
</div> |
|||
</section> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
After Width: | Height: | Size: 70 KiB |
After Width: | Height: | Size: 28 KiB |
After Width: | Height: | Size: 27 KiB |
After Width: | Height: | Size: 28 KiB |
@ -0,0 +1,77 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<odoo> |
|||
<record id="account_check_printing.view_account_payment_form_inherited" model="ir.ui.view"> |
|||
<field name="name">account.payment.form.inherited</field> |
|||
<field name="model">account.payment</field> |
|||
<field name="inherit_id" ref="account.view_account_payment_form" /> |
|||
<field name="arch" type="xml"> |
|||
<xpath expr="//button[@name='post']" position="before"> |
|||
<button name="print_checks" class="oe_highlight" attrs="{'invisible': ['|', ('payment_method_code', 'not in', ['check_printing','pdc']), ('state', '!=', 'posted')]}" string="Print Check" type="object"/> |
|||
<button name="unmark_sent" attrs="{'invisible': ['|', ('payment_method_code', 'not in', ['check_printing','pdc']), ('state', '!=', 'sent')]}" string="Unmark Sent" type="object"/> |
|||
</xpath> |
|||
<xpath expr="//div[@name='amount_div']" position="after"> |
|||
<field name="check_amount_in_words" attrs="{'invisible': [('payment_method_code', 'not in', ['check_printing','pdc'])], 'readonly': [('state', '!=', 'draft')]}" groups="base.group_no_one"/> |
|||
</xpath> |
|||
<xpath expr="//field[@name='communication']" position="after"> |
|||
<field name="check_manual_sequencing" invisible="1"/> |
|||
<field name="check_number" attrs="{'invisible': ['|', ('payment_method_code', 'not in', ['check_printing','pdc']), ('check_number', '=', 0)]}"/> |
|||
</xpath> |
|||
<xpath expr="//field[@name='payment_date']" position="after"> |
|||
<field name="effective_date" attrs="{'invisible': [('payment_method_code', '!=', 'pdc')],'required': [('payment_method_code', '=', 'pdc')]}"/> |
|||
<field name="bank_reference" attrs="{'readonly': [('state', '!=', 'draft')]}"/> |
|||
<field name="cheque_reference" attrs="{'readonly': [('state', '!=', 'draft')]}"/> |
|||
</xpath> |
|||
</field> |
|||
</record> |
|||
|
|||
<record id="account_check_printing.view_account_payment_invoice_form_inherited" model="ir.ui.view"> |
|||
<field name="name">account.payment.invoice.form.inherited</field> |
|||
<field name="model">account.payment</field> |
|||
<field name="inherit_id" ref="account.view_account_payment_invoice_form" /> |
|||
<field name="arch" type="xml"> |
|||
<xpath expr="//div[@name='amount_div']" position="after"> |
|||
<field name="check_amount_in_words" attrs="{'invisible': [('payment_method_code', 'not in', ['check_printing','pdc'])]}" groups="base.group_no_one"/> |
|||
</xpath> |
|||
<xpath expr="//field[@name='communication']" position="after"> |
|||
<field name="check_manual_sequencing" invisible="1"/> |
|||
<field name="check_number" attrs="{'invisible': ['|', ('payment_method_code', 'not in', ['check_printing','pdc']), ('check_manual_sequencing', '=', False)]}"/> |
|||
</xpath> |
|||
<xpath expr="//field[@name='payment_date']" position="after"> |
|||
<field name="effective_date" attrs="{'invisible': [('payment_method_code', '!=', 'pdc')],'required': [('payment_method_code', '=', 'pdc')]}"/> |
|||
<field name="bank_reference" attrs="{'readonly': [('state', '!=', 'draft')]}"/> |
|||
<field name="cheque_reference" attrs="{'readonly': [('state', '!=', 'draft')]}"/> |
|||
</xpath> |
|||
</field> |
|||
</record> |
|||
|
|||
<record id="account_check_printing.view_account_payment_from_invoices_inherited" model="ir.ui.view"> |
|||
<field name="name">account.register.payments.wizard.inherited</field> |
|||
<field name="model">account.register.payments</field> |
|||
<field name="inherit_id" ref="account.view_account_payment_from_invoices" /> |
|||
<field name="arch" type="xml"> |
|||
<xpath expr="//field[@name='amount']" position="after"> |
|||
<field name="check_amount_in_words" attrs="{'invisible': [('payment_method_code', 'not in', ['check_printing','pdc'])]}" groups="base.group_no_one"/> |
|||
</xpath> |
|||
<xpath expr="//field[@name='communication']" position="after"> |
|||
<field name="check_manual_sequencing" invisible="1"/> |
|||
<field name="check_number" attrs="{'invisible': ['|', ('payment_method_code', 'not in', ['check_printing','pdc']), ('check_manual_sequencing', '=', False)]}"/> |
|||
</xpath> |
|||
<xpath expr="//field[@name='payment_date']" position="after"> |
|||
<field name="effective_date" attrs="{'invisible': [('payment_method_code', '!=', 'pdc')],'required': [('payment_method_code', '=', 'pdc')]}"/> |
|||
<field name="bank_reference"/> |
|||
<field name="cheque_reference"/> |
|||
</xpath> |
|||
</field> |
|||
</record> |
|||
|
|||
<record id="account_check_printing.view_payment_check_printing_search" model="ir.ui.view"> |
|||
<field name="name">account.payment.check.printing.search</field> |
|||
<field name="model">account.payment</field> |
|||
<field name="inherit_id" ref="account.view_account_payment_search"/> |
|||
<field name="arch" type="xml"> |
|||
<xpath expr="//filter[@name='state_sent']" position="before"> |
|||
<filter string="Checks To Print" domain="[('payment_method_id.code', 'in', ['check_printing','pdc']), ('state','=','posted')]" name="checks_to_send"/> |
|||
</xpath> |
|||
</field> |
|||
</record> |
|||
</odoo> |
@ -0,0 +1,24 @@ |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################## |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# Copyright (C) 2018-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
|||
# Author: Fasluca(<faslu@cybrosys.in>) |
|||
# you can modify it under the terms of the GNU AFFERO |
|||
# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. |
|||
# |
|||
# It is forbidden to publish, distribute, sublicense, or sell copies |
|||
# of the Software or modified copies of the Software. |
|||
# |
|||
# This program is distributed in the hope that it will be useful, |
|||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. |
|||
# |
|||
# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE |
|||
# GENERAL PUBLIC LICENSE (AGPL v3) along with this program. |
|||
# If not, see <http://www.gnu.org/licenses/>. |
|||
# |
|||
############################################################################## |
|||
from . import models |
|||
from . import wizard |
@ -0,0 +1,43 @@ |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################## |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# Copyright (C) 2018-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
|||
# Author: Fasluca(<faslu@cybrosys.in>) |
|||
# you can modify it under the terms of the GNU AFFERO |
|||
# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. |
|||
# |
|||
# It is forbidden to publish, distribute, sublicense, or sell copies |
|||
# of the Software or modified copies of the Software. |
|||
# |
|||
# This program is distributed in the hope that it will be useful, |
|||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. |
|||
# |
|||
# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE |
|||
# GENERAL PUBLIC LICENSE (AGPL v3) along with this program. |
|||
# If not, see <http://www.gnu.org/licenses/>. |
|||
# |
|||
############################################################################## |
|||
{ |
|||
'name': 'Manual Bank Reconciliation', |
|||
'version': '12.0.1.0', |
|||
'author': 'Cybrosys Techno Solutions', |
|||
'company': 'Cybrosys Techno Solutions', |
|||
'website': 'http://www.cybrosys.com', |
|||
'category': 'Accounting', |
|||
'summary': 'Replacing default method by traditional', |
|||
'description': """ Replacing default bank statement reconciliation method by traditional way """, |
|||
'depends': ['account'], |
|||
'data': [ |
|||
'security/ir.model.access.csv', |
|||
'views/account_move_line_view.xml', |
|||
'views/account_journal_dashboard_view.xml', |
|||
'wizard/bank_statement_wiz_view.xml', |
|||
], |
|||
'images': ['static/description/banner.jpg'], |
|||
'license': 'AGPL-3', |
|||
'installable': True, |
|||
'auto_install': False, |
|||
} |
@ -0,0 +1,3 @@ |
|||
# -*- coding: utf-8 -*- |
|||
from . import account_move_line |
|||
from . import account_journal |
@ -0,0 +1,51 @@ |
|||
# -*- coding: utf-8 -*- |
|||
from odoo import api, fields, models, _ |
|||
from odoo.tools.misc import formatLang |
|||
|
|||
|
|||
class AccountJournal(models.Model): |
|||
_inherit = 'account.journal' |
|||
|
|||
bank_statements_source = fields.Selection([('manual', 'Record Manually'), ('undefined', 'Undefined')], string='Bank Feeds', |
|||
default='undefined', |
|||
help="Defines how the bank statements will be registered") |
|||
|
|||
@api.multi |
|||
def create_bank_statement(self): |
|||
"""return action to create a bank statements. This button should be called only on journals with type =='bank'""" |
|||
self.bank_statements_source = "manual" |
|||
action = self.env.ref('bank_reconciliation.action_bank_statement_wiz').read()[0] |
|||
action.update({ |
|||
'context': "{'default_journal_id': " + str(self.id) + "}", |
|||
}) |
|||
return action |
|||
|
|||
@api.multi |
|||
def get_journal_dashboard_datas(self): |
|||
res = super(AccountJournal, self).get_journal_dashboard_datas() |
|||
account_sum = 0.0 |
|||
bank_balance = 0.0 |
|||
currency = self.currency_id or self.company_id.currency_id |
|||
account_ids = tuple(ac for ac in [self.default_debit_account_id.id, self.default_credit_account_id.id] if ac) |
|||
if account_ids: |
|||
amount_field = 'balance' if ( |
|||
not self.currency_id or self.currency_id == self.company_id.currency_id) else 'amount_currency' |
|||
query = """SELECT sum(%s) FROM account_move_line WHERE account_id in %%s AND date <= %%s;""" % ( |
|||
amount_field,) |
|||
self.env.cr.execute(query, (account_ids, fields.Date.today(),)) |
|||
query_results = self.env.cr.dictfetchall() |
|||
if query_results and query_results[0].get('sum') != None: |
|||
account_sum = query_results[0].get('sum') |
|||
query = """SELECT sum(%s) FROM account_move_line WHERE account_id in %%s AND date <= %%s AND |
|||
statement_date is not NULL;""" % (amount_field,) |
|||
self.env.cr.execute(query, (account_ids, fields.Date.today(),)) |
|||
query_results = self.env.cr.dictfetchall() |
|||
if query_results and query_results[0].get('sum') != None: |
|||
bank_balance = query_results[0].get('sum') |
|||
difference = currency.round(account_sum - bank_balance) + 0.0 |
|||
res.update({ |
|||
'last_balance': formatLang(self.env, currency.round(bank_balance) + 0.0, currency_obj=currency), |
|||
'difference': formatLang(self.env, currency.round(difference) + 0.0, currency_obj=currency) |
|||
}) |
|||
|
|||
return res |
@ -0,0 +1,22 @@ |
|||
# -*- coding: utf-8 -*- |
|||
from odoo import api, fields, models, _ |
|||
|
|||
|
|||
class AccountMoveLine(models.Model): |
|||
_inherit = "account.move.line" |
|||
|
|||
bank_statement_id = fields.Many2one('bank.statement', 'Bank Statement', copy=False) |
|||
statement_date = fields.Date('Bank.St Date', copy=False) |
|||
|
|||
@api.multi |
|||
def write(self, vals): |
|||
if not vals.get("statement_date"): |
|||
vals.update({"reconciled": False}) |
|||
if self.payment_id and self.payment_id.state == 'reconciled': |
|||
self.payment_id.state = 'posted' |
|||
elif vals.get("statement_date"): |
|||
vals.update({"reconciled": True}) |
|||
if self.payment_id: |
|||
self.payment_id.state = 'reconciled' |
|||
res = super(AccountMoveLine, self).write(vals) |
|||
return res |
|
After Width: | Height: | Size: 48 KiB |
After Width: | Height: | Size: 59 KiB |
After Width: | Height: | Size: 101 KiB |
After Width: | Height: | Size: 50 KiB |
After Width: | Height: | Size: 9.7 KiB |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 12 KiB |
@ -0,0 +1,128 @@ |
|||
<section class="oe_container"> |
|||
<div class="oe_row oe_spaced"> |
|||
<div class="oe_span12"> |
|||
<h2 class="oe_slogan">Manual Bank Reconciliation</h2> |
|||
<h4 class="oe_slogan">Cybrosys Techno Solutions, www.cybrosys.com</h4> |
|||
<h3 class="oe_slogan">...The traditional way of reconciling bank statement...</h3> |
|||
</div> |
|||
</div> |
|||
</section> |
|||
|
|||
<section class="oe_container oe_dark"> |
|||
<div class="oe_row oe_spaced"> |
|||
<div class="oe_span12"> |
|||
<h3 class="oe_slogan"><b>What it does ?</b></h3> |
|||
</div> |
|||
<span style="font-size:18px;text-align: center" class="oe_slogan">This module replaces the Odoo default bank statement reconciliation with traditional way of just putting the date in each line</span> |
|||
</div> |
|||
</section> |
|||
|
|||
<section class="oe_container"> |
|||
<div class="oe_row oe_spaced"> |
|||
<div class="oe_span12"> |
|||
<span style="font-size:18px;"> ♣</span><span style="font-size:15px;" class="oe_slogan"> When You click on "New Statement" a window will open</span> |
|||
</div> |
|||
<div class="col-md-12"> |
|||
<div class="oe_row_img oe_demo oe_picture oe_screenshot"> |
|||
<img src="dash_board.png"> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</section> |
|||
|
|||
<section class="oe_container oe_dark"> |
|||
<div class="oe_row oe_spaced"> |
|||
<div class="oe_span12"> |
|||
<span style="font-size:18px;"> ♣</span><span style="font-size:15px;" class="oe_slogan"> There you can see the list on journal items that are 'not reconciled'</span> |
|||
</div> |
|||
<div class="col-md-12"> |
|||
<div class="oe_row_img oe_demo oe_picture oe_screenshot"> |
|||
<img src="bank_statement_wiz.png"> |
|||
</div> |
|||
</div> |
|||
<div class="oe_span12"> |
|||
<p class="oe_mt32"> |
|||
<br/> |
|||
<p>You can see the details about the current balance as per company books, bank balance based on already reconciled journal entries as 'Balance as per bank' and difference between them as 'Amount not reflected in Bank'</p> |
|||
</p> |
|||
</div> |
|||
</div> |
|||
</section> |
|||
|
|||
<section class="oe_container"> |
|||
<div class="oe_row oe_spaced"> |
|||
<div class="oe_span12"> |
|||
<span style="font-size:18px;"> ♣</span><span style="font-size:15px;" class="oe_slogan"> Fill the dates mentioned in bank statement in 'Bank.St Date' column of respective line. Click on 'Save' button before closing the window.</span> |
|||
</div> |
|||
<div class="col-md-12"> |
|||
<div class="oe_row_img oe_demo oe_picture oe_screenshot"> |
|||
<img src="bank_statement_edited.png"> |
|||
</div> |
|||
</div> |
|||
<div class="oe_span12"> |
|||
<p class="oe_mt32"> |
|||
<p> Hope you have noticed the changes in Balance as per company books, Balance as per bank and Amount not reflected in Bank</p> |
|||
</p> |
|||
</div> |
|||
</div> |
|||
</section> |
|||
|
|||
<section class="oe_container oe_dark"> |
|||
<div class="oe_row oe_spaced"> |
|||
<div class="oe_span12"> |
|||
<span style="font-size:18px;"> ♣</span><span style="font-size:15px;" class="oe_slogan"> You will be back on dashboard now. Did you notice the status updated there also </span> |
|||
</div> |
|||
<div class="col-md-12"> |
|||
<div class="oe_row_img oe_demo oe_picture oe_screenshot"> |
|||
<img src="dashboard_change.png"> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</section> |
|||
|
|||
<section class="oe_container"> |
|||
<div class="oe_row oe_spaced"> |
|||
<div class="oe_span12"> |
|||
<span style="font-size:18px;"> ♣</span><span style="font-size:15px;" class="oe_slogan"> One more thing to point out is, this will also mark the bank payments as 'Reconciled' </span> |
|||
</div> |
|||
<div class="col-md-12"> |
|||
<div class="oe_row_img oe_demo oe_picture oe_screenshot"> |
|||
<img src="payment_done.png"> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</section> |
|||
|
|||
<section class="oe_container"> |
|||
<h2 class="oe_slogan" style="margin-top:20px;" >Need Any Help?</h2> |
|||
<div class="oe_slogan" style="margin-top:10px !important;"> |
|||
<div> |
|||
<a class="btn btn-primary btn-lg mt8" |
|||
style="color: #FFFFFF !important;border-radius: 0;" href="https://www.cybrosys.com"><i |
|||
class="fa fa-envelope"></i> Email </a> <a |
|||
class="btn btn-primary btn-lg mt8" style="color: #FFFFFF !important;border-radius: 0;" |
|||
href="https://www.cybrosys.com/contact/"><i |
|||
class="fa fa-phone"></i> Contact Us </a> <a |
|||
class="btn btn-primary btn-lg mt8" style="color: #FFFFFF !important;border-radius: 0;" |
|||
href="https://www.cybrosys.com/odoo-customization-and-installation/"><i |
|||
class="fa fa-check-square"></i> Request Customization </a> |
|||
</div> |
|||
<br> |
|||
<img src="cybro_logo.png" style="width: 190px; margin-bottom: 20px;" class="center-block"> |
|||
<div> |
|||
<a href="https://twitter.com/cybrosys" target="_blank"><i class="fa fa-2x fa-twitter" style="color:white;background: #00a0d1;width:35px;"></i></a></td> |
|||
<a href="https://www.linkedin.com/company/cybrosys-technologies-pvt-ltd" target="_blank"><i class="fa fa-2x fa-linkedin" style="color:white;background: #31a3d6;width:35px;padding-left: 3px;"></i></a></td> |
|||
<a href="https://www.facebook.com/cybrosystechnologies" target="_blank"><i class="fa fa-2x fa-facebook" style="color:white;background: #3b5998;width:35px;padding-left: 8px;"></i></a></td> |
|||
<a href="https://plus.google.com/106641282743045431892/about" target="_blank"><i class="fa fa-2x fa-google-plus" style="color:white;background: #c53c2c;width:35px;padding-left: 3px;"></i></a></td> |
|||
<a href="https://in.pinterest.com/cybrosys" target="_blank"><i class="fa fa-2x fa-pinterest" style="color:white;background: #ac0f18;width:35px;padding-left: 3px;"></i></a></td> |
|||
</div> |
|||
</div> |
|||
</section> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
After Width: | Height: | Size: 52 KiB |
After Width: | Height: | Size: 50 KiB |
@ -0,0 +1,28 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<odoo> |
|||
<record id="account_journal_dashboard_kanban_view" model="ir.ui.view"> |
|||
<field name="name">account.journal.dashboard.kanban</field> |
|||
<field name="model">account.journal</field> |
|||
<field name="inherit_id" ref="account.account_journal_dashboard_kanban_view"/> |
|||
<field name="arch" type="xml"> |
|||
<div name="latest_statement" position="replace"> |
|||
<div class="row" name="latest_statement" t-if="dashboard.last_balance and dashboard.account_balance"> |
|||
<div class="col-xs-6"> |
|||
<span title="Latest Statement">Latest Statement</span> |
|||
</div> |
|||
<div class="col-xs-6 text-right"> |
|||
<span><t t-esc="dashboard.last_balance"/></span> |
|||
</div> |
|||
</div> |
|||
<div class="row" name="difference" t-if="dashboard.last_balance and dashboard.account_balance"> |
|||
<div class="col-xs-6"> |
|||
<span title="Balance Difference">Difference</span> |
|||
</div> |
|||
<div class="col-xs-6 text-right"> |
|||
<span><t t-esc="dashboard.difference"/></span> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</field> |
|||
</record> |
|||
</odoo> |
@ -0,0 +1,41 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<odoo> |
|||
<record id="view_move_line_form" model="ir.ui.view"> |
|||
<field name="name">account.move.line.form</field> |
|||
<field name="model">account.move.line</field> |
|||
<field name="inherit_id" ref="account.view_move_line_form" /> |
|||
<field name="arch" type="xml"> |
|||
<field name="date_maturity" position="after"> |
|||
<field name="statement_date"/> |
|||
</field> |
|||
</field> |
|||
</record> |
|||
<record id="view_bank_statement_move_line_tree" model="ir.ui.view"> |
|||
<field name="name">account.bank.statement.move.line.tree</field> |
|||
<field name="model">account.move.line</field> |
|||
<field name="arch" type="xml"> |
|||
<tree string="Journal Items" create="false"> |
|||
<field name="date"/> |
|||
<field name="move_id" required="0" groups="account.group_account_user"/> |
|||
<field name="journal_id" options='{"no_open":True}'/> |
|||
<field name="name"/> |
|||
<field name="ref"/> |
|||
<field name="statement_id" invisible="1"/> |
|||
<field name="partner_id"/> |
|||
<!--<field name="account_id" options='{"no_open":True}' domain="[('company_id', '=', company_id)]" groups="account.group_account_user"/>--> |
|||
<!--<field name="analytic_account_id" groups="account.group_account_user"/>--> |
|||
<field name="reconciled" invisible="1"/> |
|||
<field name="full_reconcile_id"/> |
|||
<field name="debit"/> |
|||
<field name="credit"/> |
|||
<field name="amount_currency" readonly="True" groups="base.group_multi_currency"/> |
|||
<field name="currency_id" readonly="True" invisible="1" /> |
|||
<field name="date_maturity"/> |
|||
<field name="statement_date"/> |
|||
<field name="company_currency_id" invisible="1"/> |
|||
<field name="company_id" invisible="1"/> |
|||
</tree> |
|||
</field> |
|||
</record> |
|||
|
|||
</odoo> |
@ -0,0 +1,2 @@ |
|||
# -*- coding: utf-8 -*- |
|||
from . import bank_statement_wiz |
@ -0,0 +1,56 @@ |
|||
# -*- coding: utf-8 -*- |
|||
from odoo import api, fields, models, _ |
|||
|
|||
|
|||
class BankStatement(models.Model): |
|||
_name = 'bank.statement' |
|||
|
|||
@api.onchange('journal_id', 'date_from', 'date_to') |
|||
def _get_lines(self): |
|||
self.account_id = self.journal_id.default_debit_account_id.id or self.journal_id.default_credit_account_id.id |
|||
self.currency_id = self.journal_id.currency_id or self.journal_id.company_id.currency_id or \ |
|||
self.env.user.company_id.currency_id |
|||
domain = [('account_id', '=', self.account_id.id), ('statement_date', '=', False)] |
|||
if self.date_from: |
|||
domain += [('date', '>=', self.date_from)] |
|||
if self.date_to: |
|||
domain += [('date', '<=', self.date_to)] |
|||
s_lines = [] |
|||
lines = self.env['account.move.line'].search(domain) |
|||
for line in self.statement_lines: |
|||
line.bank_statement_id = self.id |
|||
self.statement_lines = lines |
|||
|
|||
|
|||
@api.one |
|||
@api.depends('statement_lines.statement_date') |
|||
def _compute_amount(self): |
|||
gl_balance = 0 |
|||
bank_balance = 0 |
|||
current_update = 0 |
|||
domain = [('account_id', '=', self.account_id.id)] |
|||
lines = self.env['account.move.line'].search(domain) |
|||
gl_balance += sum([line.debit - line.credit for line in lines]) |
|||
domain += [('id', 'not in', self.statement_lines.ids), ('statement_date', '!=', False)] |
|||
lines = self.env['account.move.line'].search(domain) |
|||
bank_balance += sum([line.balance for line in lines]) |
|||
current_update += sum([line.debit - line.credit if line.statement_date else 0 for line in self.statement_lines]) |
|||
|
|||
self.gl_balance = gl_balance |
|||
self.bank_balance = bank_balance + current_update |
|||
self.balance_difference = self.gl_balance - self.bank_balance |
|||
|
|||
journal_id = fields.Many2one('account.journal', 'Bank', domain=[('type', '=', 'bank')]) |
|||
account_id = fields.Many2one('account.account', 'Bank Account') |
|||
date_from = fields.Date('Date From') |
|||
date_to = fields.Date('Date To') |
|||
statement_lines = fields.One2many('account.move.line', 'bank_statement_id') |
|||
gl_balance = fields.Monetary('Balance as per Company Books', readonly=True, compute='_compute_amount') |
|||
bank_balance = fields.Monetary('Balance as per Bank', readonly=True, compute='_compute_amount') |
|||
balance_difference = fields.Monetary('Amounts not Reflected in Bank', readonly=True, compute='_compute_amount') |
|||
current_update = fields.Monetary('Balance of entries updated now') |
|||
currency_id = fields.Many2one('res.currency', string='Currency') |
|||
company_id = fields.Many2one('res.company', string='Company', |
|||
default=lambda self: self.env['res.company']._company_default_get('bank.statement')) |
|||
|
|||
|
@ -0,0 +1,57 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<odoo> |
|||
|
|||
<record id="bank_statement_wiz" model="ir.ui.view"> |
|||
<field name="name">bank.statement.reconciliation</field> |
|||
<field name="model">bank.statement</field> |
|||
<field name="arch" type="xml"> |
|||
<form string="Bank Statement Reconciliation"> |
|||
<group> |
|||
<group> |
|||
<field name="journal_id"/> |
|||
<field name="account_id"/> |
|||
</group> |
|||
<group> |
|||
<field name="date_from"/> |
|||
<field name="date_to"/> |
|||
</group> |
|||
</group> |
|||
<group> |
|||
<field name="statement_lines" nolabel="1"> |
|||
<tree create="false" editable="bottom" default_order="date"> |
|||
<field name="date" readonly="True"/> |
|||
<field name="move_id" readonly="True" invisible="1" groups="account.group_account_user"/> |
|||
<field name="name" readonly="True"/> |
|||
<field name="ref" readonly="True"/> |
|||
<field name="partner_id" readonly="True"/> |
|||
<field name="amount_currency" readonly="True" groups="base.group_multi_currency"/> |
|||
<field name="currency_id" readonly="True" invisible="1" /> |
|||
<field name="date_maturity" readonly="True"/> |
|||
<field name="statement_date"/> |
|||
<field name="company_currency_id" invisible="1" readonly="True"/> |
|||
<field name="debit" readonly="True"/> |
|||
<field name="credit" readonly="True"/> |
|||
</tree> |
|||
</field> |
|||
</group> |
|||
<group class="oe_subtotal_footer oe_right"> |
|||
<field name="gl_balance"/> |
|||
<field name="balance_difference"/> |
|||
<field name="bank_balance"/> |
|||
</group> |
|||
</form> |
|||
</field> |
|||
</record> |
|||
|
|||
|
|||
<record id="action_bank_statement_wiz" model="ir.actions.act_window"> |
|||
<field name="name">Bank Statement Reconciliation</field> |
|||
<field name="res_model">bank.statement</field> |
|||
<field name="type">ir.actions.act_window</field> |
|||
<field name="view_type">form</field> |
|||
<field name="view_mode">form</field> |
|||
<field name="target">new</field> |
|||
</record> |
|||
|
|||
<menuitem id="menu_action_bank_reconciliation" parent="account.menu_finance_entries_actions" action="action_bank_statement_wiz" sequence="25"/> |
|||
</odoo> |
@ -0,0 +1,9 @@ |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################## |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# Copyright (C) 2017-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
|||
# Maintainer: Cybrosys Technologies (<https://www.cybrosys.com>) |
|||
############################################################################## |
|||
from . import models |
|||
|
@ -0,0 +1,44 @@ |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################## |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# Copyright (C) 2017-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
|||
# Author: fasluca(<https://www.cybrosys.com>) |
|||
# you can modify it under the terms of the GNU LESSER |
|||
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. |
|||
# |
|||
# It is forbidden to publish, distribute, sublicense, or sell copies |
|||
# of the Software or modified copies of the Software. |
|||
# |
|||
# 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 |
|||
# GENERAL PUBLIC LICENSE (LGPL v3) along with this program. |
|||
# If not, see <http://www.gnu.org/licenses/>. |
|||
# |
|||
############################################################################## |
|||
{ |
|||
'name': 'Draft Manufacturing Order', |
|||
'version': '12.0.1.0.0', |
|||
'summary': 'Draft State in Manufacturing Order', |
|||
'description': """ |
|||
This module provides a draft state for manufacturing order instead of default first stage 'confirmed'. |
|||
""", |
|||
'author': 'Cybrosys Techno Solutions', |
|||
'company': 'Cybrosys Techno Solutions', |
|||
'website': "https://cybrosys.com/", |
|||
'category': 'Manufacturing', |
|||
'depends': ['mrp'], |
|||
'data': [ |
|||
'views/mrp_production_view.xml', |
|||
], |
|||
'demo': [], |
|||
'images': ['static/description/banner.gif'], |
|||
'license': 'LGPL-3', |
|||
'installable': True, |
|||
'application': False |
|||
} |
|||
|
@ -0,0 +1,8 @@ |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################## |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# Copyright (C) 2017-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
|||
# Maintainer: Cybrosys Technologies (<https://www.cybrosys.com>) |
|||
############################################################################## |
|||
from . import mrp_production |
@ -0,0 +1,64 @@ |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################## |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# Copyright (C) 2009-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
|||
# Author: fasluca(<https://www.cybrosys.com>) |
|||
# you can modify it under the terms of the GNU LESSER |
|||
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. |
|||
# |
|||
# It is forbidden to publish, distribute, sublicense, or sell copies |
|||
# of the Software or modified copies of the Software. |
|||
# |
|||
# 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 |
|||
# GENERAL PUBLIC LICENSE (LGPL v3) along with this program. |
|||
# If not, see <http://www.gnu.org/licenses/>. |
|||
# |
|||
############################################################################## |
|||
|
|||
from odoo import api, models, fields, _ |
|||
from odoo.exceptions import UserError |
|||
|
|||
from odoo.addons.mrp.models.mrp_production import MrpProduction as mp |
|||
|
|||
|
|||
class MrpProduction(models.Model): |
|||
_inherit = 'mrp.production' |
|||
|
|||
state = fields.Selection([ |
|||
('draft', 'Draft'), |
|||
('confirmed', 'Confirmed'), |
|||
('planned', 'Planned'), |
|||
('progress', 'In Progress'), |
|||
('done', 'Done'), |
|||
('cancel', 'Cancelled')], string='State', |
|||
copy=False, default='draft', track_visibility='onchange') |
|||
|
|||
_sql_constraints = [ |
|||
('name_uniq', "check(state='draft' or UNIQUE(name,company_id))", 'Reference must be unique per Company!'), |
|||
] |
|||
|
|||
@api.model |
|||
def create(self, values): |
|||
production = super(mp, self).create(values) |
|||
return production |
|||
|
|||
@api.multi |
|||
def unlink(self): |
|||
if any(production.state not in ['draft', 'cancel'] for production in self): |
|||
raise UserError(_('Cannot delete a manufacturing order not in draft or cancel state')) |
|||
return super(mp, self).unlink() |
|||
|
|||
@api.multi |
|||
def action_confirm(self): |
|||
if not self.name or self.name == _('New'): |
|||
self.name = self.env['ir.sequence'].next_by_code('mrp.production') or _('New') |
|||
if not self.procurement_group_id: |
|||
self.procurement_group_id = self.env["procurement.group"].create({'name': self.name}).id |
|||
self._generate_moves() |
|||
self.state = 'confirmed' |
After Width: | Height: | Size: 54 KiB |
After Width: | Height: | Size: 35 KiB |
After Width: | Height: | Size: 178 KiB |
After Width: | Height: | Size: 50 KiB |
After Width: | Height: | Size: 8.2 KiB |
After Width: | Height: | Size: 35 KiB |
@ -0,0 +1,95 @@ |
|||
<section class="oe_container oe_dark"> |
|||
<div class="oe_row oe_spaced"> |
|||
<h2 class="oe_slogan">Draft Manufacturing Order</h2> |
|||
<h4 class="oe_slogan"><a href="https://www.cybrosys.com">Cybrosys Technologies</a></h4> |
|||
</div> |
|||
</section> |
|||
|
|||
<section class="oe_container"> |
|||
<div class="oe_row oe_spaced"> |
|||
<h2 class="oe_slogan" style="color:#875A7B;">Draft State in Manufacturing Order</h2> |
|||
<h3 class="oe_slogan"> |
|||
Provides a new state 'Draft' as default. So that users can manage a manufacturing order more easily. |
|||
</h3> |
|||
</div> |
|||
|
|||
<div class="oe_row oe_spaced"> |
|||
<h4>By Default in Odoo,</h4> |
|||
</div> |
|||
|
|||
<div class="oe_container"> |
|||
<div class="oe_row oe_spaced"> |
|||
<div> |
|||
<ul> |
|||
<li style="list-style:none !important;"><span style="color:green;"> ★</span> When we create a MO, that directly becomes 'Confirmed'.</li> |
|||
<li style="list-style:none !important;"><span style="color:green;"> ★</span> Changing Product Or Any Other Related Details Like Quantity, BoM Is Not Possible After Saving The Manufacturing Order.</li> |
|||
</ul> |
|||
</div> |
|||
<div> |
|||
<div class="oe_demo oe_picture oe_screenshot"> |
|||
<img src="MO_default.png"> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="oe_row oe_spaced"> |
|||
<h4>Using this module,</h4> |
|||
</div> |
|||
|
|||
<div class="oe_container"> |
|||
<div class="oe_row oe_spaced"> |
|||
<div> |
|||
<ul> |
|||
<li style="list-style:none !important;"><span style="color:green;"> ★</span> Newly Created Manufacturing Orders Will Be In 'Draft' State.</li> |
|||
<li style="list-style:none !important;"><span style="color:green;"> ★</span> User Can Change The Product, Quantity, etc.. On This State.</li> |
|||
<li style="list-style:none !important;"><span style="color:green;"> ★</span> A New Button 'Confirm' Is Added To Confirm The Manufacturing Order.</li> |
|||
<li style="list-style:none !important;"><span style="color:green;"> ★</span> Sequence Number Will Not Be Generated Until Confirmation Of Manufacturing Order.</li> |
|||
</ul> |
|||
</div> |
|||
<div> |
|||
<div class="oe_demo oe_picture oe_screenshot"> |
|||
<img src="MO_new.png"> |
|||
</div> |
|||
</div> |
|||
<div> |
|||
<ul> |
|||
<li style="list-style:none !important;"><span style="color:green;"> ★</span> User can delete manufacturing order in 'Draft' state.</li> |
|||
</ul> |
|||
</div> |
|||
<div> |
|||
<div class="oe_demo oe_picture oe_screenshot"> |
|||
<img src="delete_warning.png"> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
</section> |
|||
|
|||
<section class="oe_container oe_dark"> |
|||
<h2 class="oe_slogan" style="margin-top:20px;" >Need Any Help?</h2> |
|||
<div class="oe_slogan" style="margin-top:10px !important;"> |
|||
<div> |
|||
<a class="btn btn-primary btn-lg mt8" |
|||
style="color: #FFFFFF !important;border-radius: 0;" href="https://www.cybrosys.com"><i |
|||
class="fa fa-envelope"></i> Email </a> <a |
|||
class="btn btn-primary btn-lg mt8" style="color: #FFFFFF !important;border-radius: 0;" |
|||
href="https://www.cybrosys.com/contact/"><i |
|||
class="fa fa-phone"></i> Contact Us </a> <a |
|||
class="btn btn-primary btn-lg mt8" style="color: #FFFFFF !important;border-radius: 0;" |
|||
href="https://www.cybrosys.com/odoo-customization-and-installation/"><i |
|||
class="fa fa-check-square"></i> Request Customization </a> |
|||
</div> |
|||
<br> |
|||
<img src="cybro_logo.png" style="width: 190px; margin-bottom: 20px;" class="center-block"> |
|||
<div> |
|||
<a href="https://twitter.com/cybrosys" target="_blank"><i class="fa fa-2x fa-twitter" style="color:white;background: #00a0d1;width:35px;"></i></a></td> |
|||
<a href="https://www.linkedin.com/company/cybrosys-technologies-pvt-ltd" target="_blank"><i class="fa fa-2x fa-linkedin" style="color:white;background: #31a3d6;width:35px;padding-left: 3px;"></i></a></td> |
|||
<a href="https://www.facebook.com/cybrosystechnologies" target="_blank"><i class="fa fa-2x fa-facebook" style="color:white;background: #3b5998;width:35px;padding-left: 8px;"></i></a></td> |
|||
<a href="https://plus.google.com/106641282743045431892/about" target="_blank"><i class="fa fa-2x fa-google-plus" style="color:white;background: #c53c2c;width:35px;padding-left: 3px;"></i></a></td> |
|||
<a href="https://in.pinterest.com/cybrosys" target="_blank"><i class="fa fa-2x fa-pinterest" style="color:white;background: #ac0f18;width:35px;padding-left: 3px;"></i></a></td> |
|||
</div> |
|||
</div> |
|||
</section> |
|||
|
@ -0,0 +1,54 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<odoo> |
|||
<data> |
|||
<record id="mrp_production_form_view" model="ir.ui.view"> |
|||
<field name="name">mrp.production.form</field> |
|||
<field name="model">mrp.production</field> |
|||
<field name="inherit_id" ref="mrp.mrp_production_form_view"/> |
|||
<field name="arch" type="xml"> |
|||
<button name="button_mark_done" position="before"> |
|||
<button name="action_confirm" attrs="{'invisible': [('state', '!=', 'draft')]}" string="Confirm" type="object" class="oe_highlight"/> |
|||
</button> |
|||
<button name="%(mrp.action_change_production_qty)d" position="attributes"> |
|||
<attribute name="attrs">{'invisible': [('state','in',['draft','done'])]}</attribute> |
|||
</button> |
|||
</field> |
|||
</record> |
|||
|
|||
<record id="view_mrp_production_filter_extend" model="ir.ui.view"> |
|||
<field name="name">mrp.production.select</field> |
|||
<field name="model">mrp.production</field> |
|||
<field name="inherit_id" ref="mrp.view_mrp_production_filter"/> |
|||
<field name="arch" type="xml"> |
|||
<xpath expr="//filter[@name='todo']" position="replace"> |
|||
<filter string="To Do" name="todo" domain="[('state','in',('draft','confirmed', 'planned','progress'))]" |
|||
help="Manufacturing Orders which are in confirmed state."/> |
|||
</xpath> |
|||
</field> |
|||
</record> |
|||
|
|||
<record id="mrp.mrp_production_action" model="ir.actions.act_window"> |
|||
<field name="name">Manufacturing Orders</field> |
|||
<field name="type">ir.actions.act_window</field> |
|||
<field name="res_model">mrp.production</field> |
|||
<field name="view_type">form</field> |
|||
<field name="view_mode">tree,kanban,form,calendar,pivot,graph</field> |
|||
<field name="view_id" eval="False"/> |
|||
<field name="search_view_id" ref="view_mrp_production_filter_extend"/> |
|||
<field name="context">{'search_default_todo': True}</field> |
|||
<field name="help" type="html"> |
|||
<p class="oe_view_nocontent_create"> |
|||
Click to create a manufacturing order. |
|||
</p><p> |
|||
A manufacturing order, based on a bill of materials, will |
|||
consume raw materials and produce finished products. |
|||
</p><p> |
|||
Manufacturing orders are usually proposed automatically based |
|||
on customer requirements or automated rules like the minimum |
|||
stock rule. |
|||
</p> |
|||
</field> |
|||
</record> |
|||
|
|||
</data> |
|||
</odoo> |
@ -0,0 +1,12 @@ |
|||
Product Removal Authorisation v11 |
|||
================================= |
|||
User in the group "Product Deletion" can only delete the products. Those who are not in the |
|||
group cant delete the product. Odoo will raise a warning if the user in not in the group |
|||
|
|||
Credits |
|||
======= |
|||
Cybrosys Techno Solutions |
|||
|
|||
Contributors |
|||
------------ |
|||
* Niyas Raphy, Cybrosys <niyas@cybrosys.in> |
@ -0,0 +1,23 @@ |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################## |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# Copyright (C) 2017-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
|||
# Author: Niyas Raphy(<https://www.cybrosys.com>) |
|||
# you can modify it under the terms of the GNU LESSER |
|||
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. |
|||
# |
|||
# It is forbidden to publish, distribute, sublicense, or sell copies |
|||
# of the Software or modified copies of the Software. |
|||
# |
|||
# 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 |
|||
# GENERAL PUBLIC LICENSE (LGPL v3) along with this program. |
|||
# If not, see <https://www.gnu.org/licenses/>. |
|||
# |
|||
############################################################################## |
|||
from . import models |
@ -0,0 +1,41 @@ |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################## |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# Copyright (C) 2017-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
|||
# Author: Niyas Raphy(<https://www.cybrosys.com>) |
|||
# you can modify it under the terms of the GNU LESSER |
|||
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. |
|||
# |
|||
# It is forbidden to publish, distribute, sublicense, or sell copies |
|||
# of the Software or modified copies of the Software. |
|||
# |
|||
# 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 |
|||
# GENERAL PUBLIC LICENSE (LGPL v3) along with this program. |
|||
# If not, see <https://www.gnu.org/licenses/>. |
|||
# |
|||
############################################################################## |
|||
{ |
|||
'name': 'Product Removal Authorisation', |
|||
'summary': """Users in the Group "Product Deletion" Can Only Delete the Products""", |
|||
'version': '12.0.1.0.0', |
|||
'description': """Permission to delete the product""", |
|||
'author': 'Cybrosys Techno Solutions', |
|||
'company': 'Cybrosys Techno Solutions', |
|||
'website': 'https://www.cybrosys.com', |
|||
'category': 'Warehouse', |
|||
'depends': ['base', 'product'], |
|||
'license': 'LGPL-3', |
|||
'data': [ |
|||
'views/product_deletion_group.xml', |
|||
], |
|||
'demo': [], |
|||
'images': ['static/description/banner.jpg'], |
|||
'installable': True, |
|||
'auto_install': False, |
|||
} |
@ -0,0 +1,23 @@ |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################## |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# Copyright (C) 2017-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
|||
# Author: Niyas Raphy(<https://www.cybrosys.com>) |
|||
# you can modify it under the terms of the GNU LESSER |
|||
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. |
|||
# |
|||
# It is forbidden to publish, distribute, sublicense, or sell copies |
|||
# of the Software or modified copies of the Software. |
|||
# |
|||
# 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 |
|||
# GENERAL PUBLIC LICENSE (LGPL v3) along with this program. |
|||
# If not, see <https://www.gnu.org/licenses/>. |
|||
# |
|||
############################################################################## |
|||
from . import product_deletion |
@ -0,0 +1,38 @@ |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################## |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# Copyright (C) 2017-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
|||
# Author: Niyas Raphy(<https://www.cybrosys.com>) |
|||
# you can modify it under the terms of the GNU LESSER |
|||
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. |
|||
# |
|||
# It is forbidden to publish, distribute, sublicense, or sell copies |
|||
# of the Software or modified copies of the Software. |
|||
# |
|||
# 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 |
|||
# GENERAL PUBLIC LICENSE (LGPL v3) along with this program. |
|||
# If not, see <https://www.gnu.org/licenses/>. |
|||
# |
|||
############################################################################## |
|||
from odoo import models, api, _ |
|||
from odoo.exceptions import Warning |
|||
|
|||
|
|||
class ProductDeletion(models.Model): |
|||
_inherit = 'product.template' |
|||
|
|||
@api.multi |
|||
@api.model |
|||
def unlink(self, default=None): |
|||
res_user = self.env['res.users'].search([('id', '=', self._uid)]) |
|||
if not res_user.has_group('product_deletion.product_deletion_group'): |
|||
raise Warning(_( |
|||
"You cannot delete the product(s). Please contact the System Administrator")) |
|||
|
|||
|
After Width: | Height: | Size: 53 KiB |
After Width: | Height: | Size: 50 KiB |
After Width: | Height: | Size: 36 KiB |
After Width: | Height: | Size: 7.7 KiB |
@ -0,0 +1,48 @@ |
|||
<section class="oe_container"> |
|||
<div class="oe_row oe_spaced"> |
|||
<h2 class="oe_slogan">Product Removal Authorisation</h2> |
|||
<h3 class="oe_slogan">Users having the permission can only delete the products</h3> |
|||
<h4 class="oe_slogan"><a href="https://www.cybrosys.com">Cybrosys Technologies</a> </h4> |
|||
</div> |
|||
</section> |
|||
|
|||
<section> |
|||
<div class="oe_row oe_spaced oe_dark"> |
|||
<h4 class="oe_slogan">Product Form</h4> |
|||
<div class="oe_span12"> |
|||
<p class='oe_mt32'> |
|||
☛ Only users in the group Product Deletion can delete the product.<br> |
|||
☛ If user is not in the group Odoo will raise a warning message.<br> |
|||
</p> |
|||
<div class="oe_row_img oe_centered"> |
|||
<img class="oe_picture oe_screenshot" src="deletion_warning.png"> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</section> |
|||
|
|||
<section class="oe_container"> |
|||
<h2 class="oe_slogan" style="margin-top:20px;" >Need Any Help?</h2> |
|||
<div class="oe_slogan" style="margin-top:10px !important;"> |
|||
<div> |
|||
<a class="btn btn-primary btn-lg mt8" |
|||
style="color: #FFFFFF !important;border-radius: 0;" href="https://www.cybrosys.com"><i |
|||
class="fa fa-envelope"></i> Email </a> <a |
|||
class="btn btn-primary btn-lg mt8" style="color: #FFFFFF !important;border-radius: 0;" |
|||
href="https://www.cybrosys.com/contact/"><i |
|||
class="fa fa-phone"></i> Contact Us </a> <a |
|||
class="btn btn-primary btn-lg mt8" style="color: #FFFFFF !important;border-radius: 0;" |
|||
href="https://www.cybrosys.com/odoo-customization-and-installation/"><i |
|||
class="fa fa-check-square"></i> Request Customization </a> |
|||
</div> |
|||
<br> |
|||
<img src="cybro_logo.png" style="width: 190px; margin-bottom: 20px;" class="center-block"> |
|||
<div> |
|||
<a href="https://twitter.com/cybrosys" target="_blank"><i class="fa fa-2x fa-twitter" style="color:white;background: #00a0d1;width:35px;"></i></a></td> |
|||
<a href="https://www.linkedin.com/company/cybrosys-technologies-pvt-ltd" target="_blank"><i class="fa fa-2x fa-linkedin" style="color:white;background: #31a3d6;width:35px;padding-left: 3px;"></i></a></td> |
|||
<a href="https://www.facebook.com/cybrosystechnologies" target="_blank"><i class="fa fa-2x fa-facebook" style="color:white;background: #3b5998;width:35px;padding-left: 8px;"></i></a></td> |
|||
<a href="https://plus.google.com/106641282743045431892/about" target="_blank"><i class="fa fa-2x fa-google-plus" style="color:white;background: #c53c2c;width:35px;padding-left: 3px;"></i></a></td> |
|||
<a href="https://in.pinterest.com/cybrosys" target="_blank"><i class="fa fa-2x fa-pinterest" style="color:white;background: #ac0f18;width:35px;padding-left: 3px;"></i></a></td> |
|||
</div> |
|||
</div> |
|||
</section> |
@ -0,0 +1,10 @@ |
|||
<?xml version="1.0"?> |
|||
<openerp> |
|||
<data> |
|||
|
|||
<record id="product_deletion_group" model="res.groups"> |
|||
<field name="name">Product Deletion</field> |
|||
</record> |
|||
|
|||
</data> |
|||
</openerp> |
@ -0,0 +1,58 @@ |
|||
Task DeadLine Reminder v11 |
|||
========================== |
|||
This module extends the functionality of project module to allow to send deadline reminder emails on task deadline day. |
|||
|
|||
Configuration |
|||
============= |
|||
|
|||
By default, a cron job named "Task DeadLine Reminder" will be created while installing this module. |
|||
This cron job can be found in: |
|||
|
|||
**Settings > Technical > Automation > Scheduled Actions** |
|||
|
|||
This job runs daily by default. |
|||
|
|||
Usage |
|||
===== |
|||
|
|||
To use this functionality, you need to: |
|||
|
|||
#. Create a project to which the new tasks will be related. |
|||
#. Add a name, deadline date, who the task will be assigned to, etc... |
|||
#. In order to send email reminder to responsible user,you have to set reminder box (Project > Task > Reminder ) |
|||
#. Go to the Scheduled Action(Settings > Technical > Automation > Scheduled Action) and edit the time at which Deadline Reminder Action is to be done |
|||
|
|||
The cron job will do the rest. |
|||
|
|||
Installation |
|||
============ |
|||
- www.odoo.com/documentation/11.0/setup/install.html |
|||
- Install our custom addon |
|||
|
|||
Bug Tracker |
|||
=========== |
|||
Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. |
|||
|
|||
Credits |
|||
======= |
|||
Cybrosys Techno Solutions <www.cybrosys.com> |
|||
|
|||
Author |
|||
------ |
|||
* Developer v9: Saritha @ cybrosys |
|||
* Developer v10, v11: Niyas Raphy @ cybrosys |
|||
|
|||
Maintainer |
|||
---------- |
|||
|
|||
This module is maintained by Cybrosys Technologies. |
|||
|
|||
For support and more information, please visit https://www.cybrosys.com. |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
@ -0,0 +1,23 @@ |
|||
# -*- coding: utf-8 -*- |
|||
################################################################################### |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# Copyright (C) 2018-TODAY Cybrosys Technologies (<https://www.cybrosys.com>).# |
|||
# This program is free software: you can modify |
|||
# it under the terms of the GNU Affero General Public License (AGPL) as |
|||
# published by the Free Software Foundation, either version 3 of the |
|||
# License, or (at your option) any later version. |
|||
# |
|||
# This program is distributed in the hope that it will be useful, |
|||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
# GNU Affero General Public License for more details. |
|||
# |
|||
# You should have received a copy of the GNU Affero General Public License |
|||
# along with this program. If not, see <https://www.gnu.org/licenses/>. |
|||
# |
|||
################################################################################### |
|||
|
|||
from . import models |
|||
|
|||
|
|||
|
@ -0,0 +1,40 @@ |
|||
# -*- coding: utf-8 -*- |
|||
################################################################################### |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# Copyright (C) 2018-TODAY Cybrosys Technologies (<https://www.cybrosys.com>).# |
|||
# This program is free software: you can modify |
|||
# it under the terms of the GNU Affero General Public License (AGPL) as |
|||
# published by the Free Software Foundation, either version 3 of the |
|||
# License, or (at your option) any later version. |
|||
# |
|||
# This program is distributed in the hope that it will be useful, |
|||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
# GNU Affero General Public License for more details. |
|||
# |
|||
# You should have received a copy of the GNU Affero General Public License |
|||
# along with this program. If not, see <https://www.gnu.org/licenses/>. |
|||
# |
|||
################################################################################### |
|||
|
|||
{ |
|||
'name': "Task Deadline Reminder", |
|||
'version': "12.0.1.0.0", |
|||
'author': 'Cybrosys Techno Solutions', |
|||
'company': 'Cybrosys Techno Solutions', |
|||
'website': 'https://www.cybrosys.com', |
|||
'summary': '''Automatically Send Mail To Responsible User if Deadline Of Task is Today''', |
|||
'description': '''Automatically Send Mail To Responsible User if Deadline Of Task is Today''', |
|||
'category': "Project", |
|||
'depends': ['project'], |
|||
'license': 'AGPL-3', |
|||
'data': [ |
|||
'views/deadline_reminder_view.xml', |
|||
'views/deadline_reminder_cron.xml', |
|||
'data/deadline_reminder_action_data.xml' |
|||
], |
|||
'demo': [], |
|||
'images': ['static/description/banner.jpg'], |
|||
'installable': True, |
|||
'auto_install': False |
|||
} |
@ -0,0 +1,46 @@ |
|||
<?xml version="1.0" ?> |
|||
<odoo> |
|||
<data noupdate="1"> |
|||
|
|||
<record id="email_template_edi_deadline_reminder" model="mail.template"> |
|||
<field name="name">Deadline Reminder...!!</field> |
|||
<field name="email_from">${object.company_id.name}<${object.company_id.email}></field> |
|||
<field name="email_to">${object.user_id.email}</field> |
|||
<field name="subject">Today Due Task -${object.date_deadline or 'n/a' }</field> |
|||
<field name="model_id" ref="task_deadline_reminder.model_project_task" /> |
|||
<field name="auto_delete" eval="True" /> |
|||
<field name="body_html"><![CDATA[ |
|||
<div class="page"> |
|||
<div style="font-family: 'Lucica Grande', Ubuntu, Arial, Verdana, sans-serif; font-size: 12px; color: rgb(34, 34, 34); background-color: #FFF; "> |
|||
<p>Hello ${object.user_id.name},</p> |
|||
<p> This Email Is To Remind You That You Have Task As Below Listed Which Are Due On Today. </p> |
|||
</div> |
|||
<div> |
|||
<table class="table table-condensed"> |
|||
<thead> |
|||
<tr> |
|||
<th style="background-color:#9b9da0 !important;">Task</th> |
|||
<th style="background-color:#9b9da0 !important;">Project</th> |
|||
<th style="background-color:#9b9da0 !important;">Deadline</th> |
|||
<th style="background-color:#9b9da0 !important;">Assigned To</th> |
|||
<th style="background-color:#9b9da0 !important;">Link</th> |
|||
</tr> |
|||
</thead> |
|||
<tbody> |
|||
<tr> |
|||
<td><span>${object.name}</span></td> |
|||
<td><span>${object.project_id.name}</span></td> |
|||
<td><span>${object.date_deadline}</span></td> |
|||
<td><span>${object.user_id.name}</span></td> |
|||
<td><a href=/web/login/>View Now</a></td> |
|||
</tr> |
|||
</tbody> |
|||
</table> |
|||
</div> |
|||
</div> |
|||
]]> |
|||
</field> |
|||
</record> |
|||
|
|||
</data> |
|||
</odoo> |
@ -0,0 +1,5 @@ |
|||
# -*- coding: utf-8 -*- |
|||
|
|||
from . import deadline_reminder |
|||
|
|||
|
@ -0,0 +1,37 @@ |
|||
# -*- coding: utf-8 -*- |
|||
|
|||
import datetime |
|||
from datetime import datetime |
|||
from odoo import SUPERUSER_ID |
|||
from odoo import api, fields, models, _ |
|||
|
|||
|
|||
class DeadLineReminder(models.Model): |
|||
_inherit = "project.task" |
|||
|
|||
task_reminder = fields.Boolean("Reminder") |
|||
|
|||
@api.model |
|||
def _cron_deadline_reminder(self): |
|||
su_id = self.env['res.partner'].browse(SUPERUSER_ID) |
|||
for task in self.env['project.task'].search([('date_deadline', '!=', None), |
|||
('task_reminder', '=', True), ('user_id', '!=', None)]): |
|||
reminder_date = datetime.strptime(task.date_deadline, '%Y-%m-%d').date() |
|||
today = datetime.now().date() |
|||
if reminder_date == today and task: |
|||
template_id = self.env['ir.model.data'].get_object_reference( |
|||
'task_deadline_reminder', |
|||
'email_template_edi_deadline_reminder')[1] |
|||
if template_id: |
|||
email_template_obj = self.env['mail.template'].browse(template_id) |
|||
values = email_template_obj.generate_email(task.id, fields=None) |
|||
values['email_from'] = su_id.email |
|||
values['email_to'] = task.user_id.email |
|||
values['res_id'] = False |
|||
mail_mail_obj = self.env['mail.mail'] |
|||
msg_id = mail_mail_obj.create(values) |
|||
if msg_id: |
|||
msg_id.send() |
|||
return True |
|||
|
|||
|
After Width: | Height: | Size: 62 KiB |
After Width: | Height: | Size: 50 KiB |
After Width: | Height: | Size: 11 KiB |
@ -0,0 +1,76 @@ |
|||
<!DOCTYPE html> |
|||
<html> |
|||
<head></head> |
|||
<body> |
|||
<section class="oe_container"> |
|||
<div class="oe_row oe_spaced"> |
|||
<h2 class="oe_slogan">Task DeadLine Reminder</h2> |
|||
<div class="oe_span12"> |
|||
<p class="oe_mt32"><center> |
|||
This module send auto reminder to responsible user of task if deadline = Today. Cron job will |
|||
run everyday and search for task which due today and send reminder email to employee. |
|||
</center></p> |
|||
</div> |
|||
</div> |
|||
</section> |
|||
|
|||
<section class="oe_container"> |
|||
<div class="oe_row"> |
|||
<h3 class="oe_slogan">Project Task Form - Configuration of Task Deadline Reminder</h3> |
|||
<div class="oe_span12"> |
|||
<p class='oe_mt32'><center> |
|||
If set this box then only this task will be consider for reminder. |
|||
</center></p> |
|||
</div> |
|||
<div class="oe_span12"> |
|||
<div class="oe_demo oe_picture oe_screenshot"> |
|||
<img src="project_task_form.jpg"> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</section> |
|||
|
|||
<section class="oe_container"> |
|||
<div class="oe_row"> |
|||
<h3 class="oe_slogan">Automation Scheduled Action - Cron Job</h3> |
|||
<div class="oe_span12"> |
|||
<div class="oe_demo oe_picture oe_screenshot"> |
|||
<img src="scheduled_action_form.png"> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</section> |
|||
|
|||
<section class="oe_container"> |
|||
<div class="oe_row"> |
|||
<h3 class="oe_slogan">Email to User/Employee</h3> |
|||
<div class="oe_span12"> |
|||
<p class='oe_mt32'><center> |
|||
View Now link will allow user to jump to related task directly. This email will group all tasks which are deadline today for that user and send summary table to user/employee by email. |
|||
</center></p> |
|||
</div> |
|||
<div class="oe_span12"> |
|||
<div class="oe_demo oe_picture oe_screenshot"> |
|||
<img src="mail.png"> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</section> |
|||
<section class="oe_container oe_dark"> |
|||
<h2 class="oe_slogan" style="margin-top:20px;" >Need Any Help?</h2> |
|||
<div class="oe_slogan" style="margin-top:10px !important;"> |
|||
<a class="btn btn-primary btn-lg mt8" |
|||
style="color: #FFFFFF !important;" href="http://www.cybrosys.com"><i |
|||
class="fa fa-envelope"></i> Email </a> <a |
|||
class="btn btn-primary btn-lg mt8" style="color: #FFFFFF !important;" |
|||
href="http://www.cybrosys.com/contact/"><i |
|||
class="fa fa-phone"></i> Contact Us </a> <a |
|||
class="btn btn-primary btn-lg mt8" style="color: #FFFFFF !important;" |
|||
href="http://www.cybrosys.com/odoo-customization-and-installation/"><i |
|||
class="fa fa-check-square"></i> Request Customization </a> |
|||
</div> |
|||
<img src="cybro_logo.png" style="width: 190px; margin-bottom: 20px;" class="center-block"> |
|||
</section> |
|||
|
|||
</body> |
|||
</html> |
After Width: | Height: | Size: 33 KiB |
After Width: | Height: | Size: 258 KiB |
After Width: | Height: | Size: 81 KiB |
@ -0,0 +1,16 @@ |
|||
<?xml version="1.0" encoding='UTF-8'?> |
|||
<odoo> |
|||
|
|||
<record id="availability_create_cron" model="ir.cron"> |
|||
<field name="name">Task DeadLine Reminder</field> |
|||
<field name="model_id" ref="project.model_project_task"/> |
|||
<field name="state">code</field> |
|||
<field name="code">model._cron_deadline_reminder()</field> |
|||
<field name="user_id" ref="base.user_root" /> |
|||
<field name="interval_number">1</field> |
|||
<field name="interval_type">days</field> |
|||
<field name="numbercall">-1</field> |
|||
<field eval="False" name="doall" /> |
|||
</record> |
|||
|
|||
</odoo> |
@ -0,0 +1,17 @@ |
|||
<?xml version="1.0" encoding='UTF-8'?> |
|||
<odoo> |
|||
<data> |
|||
|
|||
<record model="ir.ui.view" id="task_deadline_reminder_form"> |
|||
<field name="name">ProjectTaskRemainder</field> |
|||
<field name="model">project.task</field> |
|||
<field name="inherit_id" ref="project.view_task_form2"/> |
|||
<field name="arch" type="xml"> |
|||
<field name="tag_ids" position="after"> |
|||
<field name="task_reminder"/> |
|||
</field> |
|||
</field> |
|||
</record> |
|||
|
|||
</data> |
|||
</odoo> |
@ -0,0 +1,11 @@ |
|||
Total Payable & Receivable v11 |
|||
============================== |
|||
This module will make total payable and receivable field in customer and vendor form |
|||
|
|||
Credits |
|||
======= |
|||
Cybrosys Techno Solutions |
|||
|
|||
Contributors |
|||
------------ |
|||
* Niyas Raphy, Cybrosys <www.cybrosys.com> |
@ -0,0 +1,22 @@ |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################## |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# Copyright (C) 2017-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
|||
# Author: Niyas Raphy(<https://www.cybrosys.com>) |
|||
# you can modify it under the terms of the GNU LESSER |
|||
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. |
|||
# |
|||
# It is forbidden to publish, distribute, sublicense, or sell copies |
|||
# of the Software or modified copies of the Software. |
|||
# |
|||
# 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 |
|||
# GENERAL PUBLIC LICENSE (LGPL v3) along with this program. |
|||
# If not, see <https://www.gnu.org/licenses/>. |
|||
# |
|||
############################################################################## |
@ -0,0 +1,41 @@ |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################## |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# Copyright (C) 2017-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
|||
# Author: Niyas Raphy(<https://www.cybrosys.com>) |
|||
# you can modify it under the terms of the GNU LESSER |
|||
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. |
|||
# |
|||
# It is forbidden to publish, distribute, sublicense, or sell copies |
|||
# of the Software or modified copies of the Software. |
|||
# |
|||
# 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 |
|||
# GENERAL PUBLIC LICENSE (LGPL v3) along with this program. |
|||
# If not, see <https://www.gnu.org/licenses/>. |
|||
# |
|||
############################################################################## |
|||
{ |
|||
'name': 'Payable And Receivable Amount', |
|||
'summary': """Amount Payable & Receivable In Partner Form""", |
|||
'version': '12.0.1.0.0', |
|||
'description': """Amount Payable & Receivable In Partner Form""", |
|||
'author': 'Cybrosys Techno Solutions', |
|||
'company': 'Cybrosys Techno Solutions', |
|||
'website': 'https://www.cybrosys.com', |
|||
'category': 'Accounting', |
|||
'depends': ['base'], |
|||
'license': 'LGPL-3', |
|||
'data': [ |
|||
'views/total_payable_receivable_view.xml', |
|||
], |
|||
'demo': [], |
|||
'images': ['static/description/banner.jpg'], |
|||
'installable': True, |
|||
'auto_install': False, |
|||
} |
After Width: | Height: | Size: 62 KiB |
After Width: | Height: | Size: 74 KiB |
After Width: | Height: | Size: 50 KiB |
After Width: | Height: | Size: 8.5 KiB |
@ -0,0 +1,47 @@ |
|||
<section class="oe_container"> |
|||
<div class="oe_row oe_spaced"> |
|||
<h2 class="oe_slogan">Payable And Receivable Amounts</h2> |
|||
<h3 class="oe_slogan">It shows total payable & receivable amount in partner form</h3> |
|||
<h4 class="oe_slogan"><a href="https://www.cybrosys.com">Cybrosys Technologies</a> </h4> |
|||
</div> |
|||
</section> |
|||
|
|||
<section> |
|||
<div class="oe_row oe_spaced oe_dark"> |
|||
<h4 class="oe_slogan">Partner Form</h4> |
|||
<div class="oe_span12"> |
|||
<p class='oe_mt32'> |
|||
☛ Amount payable and receivable is shown in the partner form<br> |
|||
</p> |
|||
<div class="oe_row_img oe_centered"> |
|||
<img class="oe_picture oe_screenshot" src="amount_total.png"> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</section> |
|||
|
|||
<section class="oe_container"> |
|||
<h2 class="oe_slogan" style="margin-top:20px;" >Need Any Help?</h2> |
|||
<div class="oe_slogan" style="margin-top:10px !important;"> |
|||
<div> |
|||
<a class="btn btn-primary btn-lg mt8" |
|||
style="color: #FFFFFF !important;border-radius: 0;" href="https://www.cybrosys.com"><i |
|||
class="fa fa-envelope"></i> Email </a> <a |
|||
class="btn btn-primary btn-lg mt8" style="color: #FFFFFF !important;border-radius: 0;" |
|||
href="https://www.cybrosys.com/contact/"><i |
|||
class="fa fa-phone"></i> Contact Us </a> <a |
|||
class="btn btn-primary btn-lg mt8" style="color: #FFFFFF !important;border-radius: 0;" |
|||
href="https://www.cybrosys.com/odoo-customization-and-installation/"><i |
|||
class="fa fa-check-square"></i> Request Customization </a> |
|||
</div> |
|||
<br> |
|||
<img src="cybro_logo.png" style="width: 190px; margin-bottom: 20px;" class="center-block"> |
|||
<div> |
|||
<a href="https://twitter.com/cybrosys" target="_blank"><i class="fa fa-2x fa-twitter" style="color:white;background: #00a0d1;width:35px;"></i></a></td> |
|||
<a href="https://www.linkedin.com/company/cybrosys-technologies-pvt-ltd" target="_blank"><i class="fa fa-2x fa-linkedin" style="color:white;background: #31a3d6;width:35px;padding-left: 3px;"></i></a></td> |
|||
<a href="https://www.facebook.com/cybrosystechnologies" target="_blank"><i class="fa fa-2x fa-facebook" style="color:white;background: #3b5998;width:35px;padding-left: 8px;"></i></a></td> |
|||
<a href="https://plus.google.com/106641282743045431892/about" target="_blank"><i class="fa fa-2x fa-google-plus" style="color:white;background: #c53c2c;width:35px;padding-left: 3px;"></i></a></td> |
|||
<a href="https://in.pinterest.com/cybrosys" target="_blank"><i class="fa fa-2x fa-pinterest" style="color:white;background: #ac0f18;width:35px;padding-left: 3px;"></i></a></td> |
|||
</div> |
|||
</div> |
|||
</section> |
@ -0,0 +1,18 @@ |
|||
<?xml version="1.0"?> |
|||
<odoo> |
|||
<data> |
|||
<record model="ir.ui.view" id="res_partner_total_payable_receivable"> |
|||
<field name="name">res.partner</field> |
|||
<field name="model">res.partner</field> |
|||
<field name="inherit_id" ref="base.view_partner_form"/> |
|||
<field name="arch" type="xml"> |
|||
<xpath expr="//field[@name='property_payment_term_id']" position="after"> |
|||
<field name="credit"/> |
|||
</xpath> |
|||
<xpath expr="//field[@name='property_supplier_payment_term_id']" position="after"> |
|||
<field name="debit"/> |
|||
</xpath> |
|||
</field> |
|||
</record> |
|||
</data> |
|||
</odoo> |