Sale Discount on Total Amount

by
Odoo 5
v 8.0 Third Party 8306
Download for 8.0 series
You bought this module and need support ? Click here !
Technical name sale_discount_total
LicenseSee License tab
Websitehttp://www.cybrosys.com
Read description for v 12.0 v 11.0 v 10.0 v 9.0
Required Apps Sales Management (sale)
Warehouse Management (stock)
Online Billing (account_voucher)
eInvoicing (account)
Technical name sale_discount_total
LicenseSee License tab
Websitehttp://www.cybrosys.com
Read description for v 12.0 v 11.0 v 10.0 v 9.0
Required Apps Sales Management (sale)
Warehouse Management (stock)
Online Billing (account_voucher)
eInvoicing (account)

Global Discount In Sale

Global Discount In Sale

Cybrosys Technologies
cybrosys technologies

Overview

This module allows you to mention discount on Total of sale order and Total of Customer Invoice as percentage or as amount.

Features

Select 'Percentage' from Discount type and give discount percentage as Discount rate.

Select 'Amount' from Discount type and give discount amount as Discount rate.

System will update the value of Discount and Total

Screenshots

Sale Order

Customer Invoice

And the module also allows you to set a limit for total discount in percentage. Exceeding this limit will require approval.

Manager level users can approve sale orders in 'Waiting Approval' stage.

cybrosys technologies

Our Industries

Trading

Easily procure and sell your products.

Manufacturing

Plan, track and schedule your operations.

Restaurant

Run your bar or restaurant methodical.

POS

Easy configuring and convivial selling.

E-commerce & Website

Mobile friendly, awe-inspiring product pages.

Hotel Management

An all-inclusive hotel management application.

Education

A Collaborative platform for educational management.

Service Management

Keep track of services and invoice accordingly.

Odoo Proprietary License v1.0

This software and associated files (the "Software") may only be used (executed,
modified, executed after modifications) if you have purchased a valid license
from the authors, typically via Odoo Apps, or if you have received a written
agreement from the authors of the Software (see the COPYRIGHT file).

You may develop Odoo modules that use the Software as a library (typically
by depending on it, importing it and using its resources), but without copying
any source code or material from the Software. You may distribute those
modules under the license of your choice, provided that this license is
compatible with the terms of the Odoo Proprietary License (For example:
LGPL, MIT, or proprietary licenses similar to this one).

It is forbidden to publish, distribute, sublicense, or sell copies of the Software
or modified copies of the Software.

The above copyright notice and this permission notice must be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.

Please log in to comment on this module

Please choose a rating from 1 to 5 for this module.
Odoo
TypeError: 'function' object is not iterable
by on

Received this error on install ... Traceback (most recent call last): File "/usr/local/lib/python2.7/site-packages/openerp/http.py", line 499, in _handle_exception return super(JsonRequest, self)._handle_exception(exception) File "/usr/local/lib/python2.7/site-packages/openerp/http.py", line 516, in dispatch result = self._call_function(**self.params) File "/usr/local/lib/python2.7/site-packages/openerp/http.py", line 282, in _call_function return checked_call(self.db, *args, **kwargs) File "/usr/local/lib/python2.7/site-packages/openerp/service/model.py", line 113, in wrapper return f(dbname, *args, **kwargs) File "/usr/local/lib/python2.7/site-packages/openerp/http.py", line 279, in checked_call return self.endpoint(*a, **kw) File "/usr/local/lib/python2.7/site-packages/openerp/http.py", line 732, in __call__ return self.method(*args, **kw) File "/usr/local/lib/python2.7/site-packages/openerp/http.py", line 375, in response_wrap response = f(*args, **kw) File "/var/packages/Odoo8/target/addons/web/controllers/main.py", line 948, in call_button action = self._call_kw(model, method, args, {}) File "/var/packages/Odoo8/target/addons/web/controllers/main.py", line 936, in _call_kw return getattr(request.registry.get(model), method)(request.cr, request.uid, *args, **kwargs) File "/usr/local/lib/python2.7/site-packages/openerp/api.py", line 237, in wrapper return old_api(self, *args, **kwargs) File "/usr/local/lib/python2.7/site-packages/openerp/addons/base/module/module.py", line 450, in button_immediate_install return self._button_immediate_function(cr, uid, ids, self.button_install, context=context) File "/usr/local/lib/python2.7/site-packages/openerp/api.py", line 237, in wrapper return old_api(self, *args, **kwargs) File "/usr/local/lib/python2.7/site-packages/openerp/addons/base/module/module.py", line 497, in _button_immediate_function registry = openerp.modules.registry.RegistryManager.new(cr.dbname, update_module=True) File "/usr/local/lib/python2.7/site-packages/openerp/modules/registry.py", line 324, in new openerp.modules.load_modules(registry._db, force_demo, status, update_module) File "/usr/local/lib/python2.7/site-packages/openerp/modules/loading.py", line 358, in load_modules loaded_modules, update_module) File "/usr/local/lib/python2.7/site-packages/openerp/modules/loading.py", line 263, in load_marked_modules loaded, processed = load_module_graph(cr, graph, progressdict, report=report, skip_modules=loaded_modules, perform_checks=perform_checks) File "/usr/local/lib/python2.7/site-packages/openerp/modules/loading.py", line 158, in load_module_graph models = registry.load(cr, package) File "/usr/local/lib/python2.7/site-packages/openerp/modules/registry.py", line 147, in load model = cls._build_model(self, cr) File "/usr/local/lib/python2.7/site-packages/openerp/models.py", line 652, in _build_model model.__init__(pool, cr) File "/usr/local/lib/python2.7/site-packages/openerp/models.py", line 818, in __init__ cls._init_function_fields(pool, cr) File "/usr/local/lib/python2.7/site-packages/openerp/models.py", line 663, in _init_function_fields column.digits_change(cr) File "/usr/local/lib/python2.7/site-packages/openerp/osv/fields.py", line 326, in digits_change precision, scale = self.digits TypeError: 'function' object is not iterable


Odoo
'function' object is not iterable
by on

Tried to install it and received this error Odoo Server Error Traceback (most recent call last): File "/opt/odoo/openerp/http.py", line 530, in _handle_exception return super(JsonRequest, self)._handle_exception(exception) File "/opt/odoo/openerp/http.py", line 567, in dispatch result = self._call_function(**self.params) File "/opt/odoo/openerp/http.py", line 303, in _call_function return checked_call(self.db, *args, **kwargs) File "/opt/odoo/openerp/service/model.py", line 113, in wrapper return f(dbname, *args, **kwargs) File "/opt/odoo/openerp/http.py", line 300, in checked_call return self.endpoint(*a, **kw) File "/opt/odoo/openerp/http.py", line 796, in __call__ return self.method(*args, **kw) File "/opt/odoo/openerp/http.py", line 396, in response_wrap response = f(*args, **kw) File "/opt/odoo/addons/web/controllers/main.py", line 953, in call_button action = self._call_kw(model, method, args, {}) File "/opt/odoo/addons/web/controllers/main.py", line 941, in _call_kw return getattr(request.registry.get(model), method)(request.cr, request.uid, *args, **kwargs) File "/opt/odoo/openerp/api.py", line 241, in wrapper return old_api(self, *args, **kwargs) File "/opt/odoo/openerp/addons/base/module/module.py", line 450, in button_immediate_install return self._button_immediate_function(cr, uid, ids, self.button_install, context=context) File "/opt/odoo/openerp/api.py", line 241, in wrapper return old_api(self, *args, **kwargs) File "/opt/odoo/openerp/addons/base/module/module.py", line 498, in _button_immediate_function registry = openerp.modules.registry.RegistryManager.new(cr.dbname, update_module=True) File "/opt/odoo/openerp/modules/registry.py", line 366, in new openerp.modules.load_modules(registry._db, force_demo, status, update_module) File "/opt/odoo/openerp/modules/loading.py", line 355, in load_modules loaded_modules, update_module) File "/opt/odoo/openerp/modules/loading.py", line 255, in load_marked_modules loaded, processed = load_module_graph(cr, graph, progressdict, report=report, skip_modules=loaded_modules, perform_checks=perform_checks) File "/opt/odoo/openerp/modules/loading.py", line 156, in load_module_graph registry.setup_models(cr, partial=True) File "/opt/odoo/openerp/modules/registry.py", line 191, in setup_models model._setup_fields(cr, SUPERUSER_ID) File "/opt/odoo/openerp/api.py", line 241, in wrapper return old_api(self, *args, **kwargs) File "/opt/odoo/openerp/api.py", line 336, in old_api result = method(recs, *args, **kwargs) File "/opt/odoo/openerp/models.py", line 2992, in _setup_fields field.setup(self.env) File "/opt/odoo/openerp/fields.py", line 412, in setup self._setup_regular(env) File "/opt/odoo/openerp/fields.py", line 1011, in _setup_regular self._setup_digits(env) File "/opt/odoo/openerp/fields.py", line 1007, in _setup_digits self.column.digits_change(env.cr) File "/opt/odoo/openerp/osv/fields.py", line 363, in digits_change precision, scale = self.digits TypeError: 'function' object is not iterable


Odoo
by on

Hi, I have updated "sale" module version 8.0.1, but still having the same installation error. Please help. Thank you.


Odoo
Solving the installation problem
by on

If you face the same problem as ELB, just update your "sale" module before installing this one.


Odoo
would this work with 9.0 version ?
by on

Odoo
Error install
by on

Hi all, I try to install, But there is an error: "ProgrammingError: missing FROM-clause entry for table "cr" LINE 20: ...:integer as shipped_qty_1,sum(l.product_uom_qty * cr.rate * ..." Traceback (most recent call last): File "/opt/odoo/odoo/openerp/http.py", line 536, in _handle_exception return super(JsonRequest, self)._handle_exception(exception) File "/opt/odoo/odoo/openerp/http.py", line 573, in dispatch result = self._call_function(**self.params) File "/opt/odoo/odoo/openerp/http.py", line 309, in _call_function return checked_call(self.db, *args, **kwargs) File "/opt/odoo/odoo/openerp/service/model.py", line 113, in wrapper return f(dbname, *args, **kwargs) File "/opt/odoo/odoo/openerp/http.py", line 306, in checked_call return self.endpoint(*a, **kw) File "/opt/odoo/odoo/openerp/http.py", line 802, in __call__ return self.method(*args, **kw) File "/opt/odoo/odoo/openerp/http.py", line 402, in response_wrap response = f(*args, **kw) File "/opt/odoo/odoo/addons/web/controllers/main.py", line 941, in call_button action = self._call_kw(model, method, args, {}) File "/opt/odoo/odoo/addons/web/controllers/main.py", line 929, in _call_kw return getattr(request.registry.get(model), method)(request.cr, request.uid, *args, **kwargs) File "/opt/odoo/odoo/openerp/api.py", line 241, in wrapper return old_api(self, *args, **kwargs) File "/opt/odoo/odoo/openerp/addons/base/module/module.py", line 450, in button_immediate_install return self._button_immediate_function(cr, uid, ids, self.button_install, context=context) File "/opt/odoo/odoo/openerp/api.py", line 241, in wrapper return old_api(self, *args, **kwargs) File "/opt/odoo/odoo/openerp/addons/base/module/module.py", line 498, in _button_immediate_function registry = openerp.modules.registry.RegistryManager.new(cr.dbname, update_module=True) File "/opt/odoo/odoo/openerp/modules/registry.py", line 370, in new openerp.modules.load_modules(registry._db, force_demo, status, update_module) File "/opt/odoo/odoo/openerp/modules/loading.py", line 355, in load_modules loaded_modules, update_module) File "/opt/odoo/odoo/openerp/modules/loading.py", line 255, in load_marked_modules loaded, processed = load_module_graph(cr, graph, progressdict, report=report, skip_modules=loaded_modules, perform_checks=perform_checks) File "/opt/odoo/odoo/openerp/modules/loading.py", line 157, in load_module_graph init_module_models(cr, package.name, models) File "/opt/odoo/odoo/openerp/modules/module.py", line 290, in init_module_models obj.init(cr) File "/opt/odoo/odoo/openerp/api.py", line 241, in wrapper return old_api(self, *args, **kwargs) File "/opt/odoo/odoo/addons/sale/report/sale_report.py", line 119, in init )""" % (self._table, self._select(), self._from(), self._group_by())) File "/opt/odoo/odoo/openerp/sql_db.py", line 158, in wrapper return f(self, *args, **kwargs) File "/opt/odoo/odoo/openerp/sql_db.py", line 234, in execute res = self._obj.execute(query, params) ProgrammingError: missing FROM-clause entry for table "cr" LINE 20: ...:integer as shipped_qty_1,sum(l.product_uom_qty * cr.rate * ... ^


Odoo
by on

Hi all, We have removed rounding from both quotation and invoice. you can set rounding if you need by changing decimal precision of 'Account'.


Odoo
by on

Hi The rounding doesn't work on invoices ?


Odoo
Rounding
by on

Can you please check again rounding on Quotation does not works, only on Invoices


Odoo
Updated
by on

Rounding removed from SO Decimal points in printed invoice is two digits now


Odoo
Quotation round as integer again
by on

Now the Invoice rounds well, but the Quotation round to the next Integer


Odoo
Print a lot of decimal digits at the Invoice Discount Lines
by on

The Discount apply well for Sales and Invoices, but for each Line on the printed Invoice, it print 10 decimal digits, The Decimal Accuracy is only 1 by me for the Discount Value


Odoo
Breaks the delivery method/shipping fee caculation
by on

Hi, Thanks for the development. However it seems this will break the delivery method/shipping fee caculation. With this module installed, even not using it, the delivery method/shipping fee will be affected. The delivery method/shipping fee still calculates correctly, but won't add to the sales total amount. Best Regards,


Odoo
Thanks For Feedback
by on

We removed rounding from invoice too . Thanks for your feed backs. and apologies for making you post same issue again .


Odoo
Getting Better
by on

I have tested the rounding you made and I noticed on the Quotation all works fine, but on the Invoice only the amount_discount is still rounded as Integer. I hope you can check on this


Odoo
Rounding removed
by on

As per your comments we removed rounding of amounts and preserved normal presentation of the margin value. Thank you for your valuable comments


Odoo
getting error need fix
by on

Error details: Field `discount_rate` does not exist Error context: View `discount.sale.order.form` [view_id: 944, xml_id: n/a, model: sale.order, parent_id: 575]" while parsing /tmp/tmpUsP5_B/sale_discount_total/views/sale_view.xml:4, near discount.sale.order.form sale.order <xpath expr="//group[@name='sale_total']" position="replace">


Odoo
Round function, not working
by on

It is a very usefully Module, it only has the Issue, that the untaxed Amount, taxed Amount and total Amount is rounded as Integer Value, not including the Decimals (only shows zeros). The Quotation Screen also loose his normal Presentation at the Margin Values


Odoo
Bug Fixed
by on

We had fixed the bug and we will include discount in both sales and invoice report. Thanks for your valuable comments.


Odoo
Bug??
by on

I installed module. But there is an error: AttributeError: 'NoneType' object has no attribute 'iteritems' I tried clean Odoo but no success. Any suggestion?


Odoo
nice
by on

thx


Odoo
Very very nice
by on

Thank you very much!! I've been searching for this function for such a long time and it will be more intressting if you could add the discount on the sale report and the invoice report. thanks again!