9 changed files with 173 additions and 0 deletions
			
			
		| @ -0,0 +1,23 @@ | |||||
|  | # -*- coding: utf-8 -*- | ||||
|  | ############################################################################## | ||||
|  | # | ||||
|  | #    Cybrosys Technologies Pvt. Ltd. | ||||
|  | #    Copyright (C) 2016-TODAY Cybrosys Technologies(<http://www.cybrosys.com>). | ||||
|  | #    Author: Cybrosys Technologies(<http://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/>. | ||||
|  | # | ||||
|  | ############################################################################## | ||||
|  | import models | ||||
| @ -0,0 +1,42 @@ | |||||
|  | # -*- coding: utf-8 -*- | ||||
|  | ############################################################################## | ||||
|  | # | ||||
|  | #    Cybrosys Technologies Pvt. Ltd. | ||||
|  | #    Copyright (C) 2016-TODAY Cybrosys Technologies(<http://www.cybrosys.com>). | ||||
|  | #    Author: Cybrosys Technologies(<http://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': 'Excess Amount Warning', | ||||
|  |     'version': '9.0.1.0.0', | ||||
|  |     'summary': 'Prevent Invoice Creation When Down Payment is Greater Than SO Total', | ||||
|  |     'description': """Prevent Invoice Creation When Down Payment is Greater Than SO Total""", | ||||
|  |     'author': 'Cybrosys Techno Solutions', | ||||
|  |     'company': 'Cybrosys Techno Solutions', | ||||
|  |     'website': "http://www.cybrosys.com", | ||||
|  |     'category': 'Sales', | ||||
|  |     'website': 'www.cybrosys.com', | ||||
|  |     'depends': [ | ||||
|  |         'base', | ||||
|  |         'sale', | ||||
|  |         'stock' | ||||
|  |     ], | ||||
|  |     'images': ['static/description/banner.jpg'], | ||||
|  |     'license': 'LGPL-3', | ||||
|  |     'installable': True, | ||||
|  |     'auto_install': False, | ||||
|  | } | ||||
| @ -0,0 +1,23 @@ | |||||
|  | # -*- coding: utf-8 -*- | ||||
|  | ############################################################################## | ||||
|  | # | ||||
|  | #    Cybrosys Technologies Pvt. Ltd. | ||||
|  | #    Copyright (C) 2016-TODAY Cybrosys Technologies(<http://www.cybrosys.com>). | ||||
|  | #    Author: Cybrosys Technologies(<http://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/>. | ||||
|  | # | ||||
|  | ############################################################################## | ||||
|  | import warning_sale_invoice | ||||
| @ -0,0 +1,38 @@ | |||||
|  | # -*- coding: utf-8 -*- | ||||
|  | ############################################################################## | ||||
|  | # | ||||
|  | #    Cybrosys Technologies Pvt. Ltd. | ||||
|  | #    Copyright (C) 2016-TODAY Cybrosys Technologies(<http://www.cybrosys.com>). | ||||
|  | #    Author: Cybrosys Technologies(<http://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 openerp import models, api, _ | ||||
|  | from openerp.exceptions import UserError | ||||
|  | 
 | ||||
|  | 
 | ||||
|  | class WarningOnSaleInvoice(models.TransientModel): | ||||
|  |     _inherit = 'sale.advance.payment.inv' | ||||
|  | 
 | ||||
|  |     @api.multi | ||||
|  |     def _create_invoice(self, order, so_line, amount): | ||||
|  |         total_inv = 0 | ||||
|  |         for invoices in self.env['account.invoice'].search([('origin', '=', order.name)]): | ||||
|  |             total_inv += invoices.amount_total | ||||
|  |         total_inv += amount | ||||
|  |         if total_inv > order.amount_total: | ||||
|  |             raise UserError(_('You are trying to invoice more than total price')) | ||||
|  |         return super(WarningOnSaleInvoice, self)._create_invoice(order, so_line, amount) | ||||
| After Width: | Height: | Size: 68 KiB | 
| After Width: | Height: | Size: 50 KiB | 
| After Width: | Height: | Size: 26 KiB | 
| @ -0,0 +1,47 @@ | |||||
|  | <section class="oe_container"> | ||||
|  |      <div class="oe_row oe_spaced"> | ||||
|  |         <h2 class="oe_slogan">Excess Amount Warning for Down Payment</h2> | ||||
|  |         <h3 class="oe_slogan">It raise warning when a user try to pay down payment greater than sale order total amount</h3> | ||||
|  |          <h4 class="oe_slogan">Author : Cybrosys Techno Solutions , www.cybrosys.com</h4> | ||||
|  |     </div> | ||||
|  | </section> | ||||
|  | 
 | ||||
|  | <section> | ||||
|  |     <div class="oe_row oe_spaced oe_dark"> | ||||
|  |         <h4 class="oe_slogan">Create invoice with down payment</h4> | ||||
|  |         <div class="oe_span12"> | ||||
|  |             <p class='oe_mt32'> | ||||
|  |                 ☛ Error message when you try to invoice a greater value than SO total amount<br> | ||||
|  |             </p> | ||||
|  |             <div class="oe_row_img oe_centered"> | ||||
|  |                 <img class="oe_picture oe_screenshot" src="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="http://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="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;border-radius: 0;" | ||||
|  | 				href="http://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: 82 KiB | 
					Loading…
					
					
				
		Reference in new issue