Sale Discount on Total Amount

by
Odoo 25
v 8.0 v 9.0 v 10.0 v 11.0 v 12.0 Third Party 10115
Download for v 12.0 Deploy on Odoo.sh
Required Apps Invoicing (account)
Technical Name sale_discount_total
LicenseAGPL-3
Websitehttp://www.cybrosys.com
Also available in version v 8.0 v 13.0 v 11.0 v 10.0 v 9.0
You bought this module and need support? Click here!
Required Apps Invoicing (account)
Technical Name sale_discount_total
LicenseAGPL-3
Websitehttp://www.cybrosys.com
Also available in version v 8.0 v 13.0 v 11.0 v 10.0 v 9.0

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 Services

Odoo Customization

Odoo Implementation

Odoo Integration

Odoo Support

Hire Odoo Developers

Our Industries

Odoo Industry

Trading

Easily procure and sell your products.

Odoo Industry

Manufacturing

Plan, track and schedule your operations.

Odoo Industry

Restaurant

Run your bar or restaurant methodical.

Odoo Industry

POS

Easy configuring and convivial selling.

Odoo Industry

E-commerce & Website

Mobile friendly, awe-inspiring product pages.

Odoo Industry

Hotel Management

An all-inclusive hotel management application.

Odoo Industry

Education

A Collaborative platform for educational management.

Odoo Industry

Service Management

Keep track of services and invoice accordingly.

Email us Contact Us Request Customization

Please log in to comment on this module

  • The author can leave a single reply to each comment.
  • This section is meant to ask simple questions or leave a rating. Every report of a problem experienced while using the module should be addressed to the author directly (refer to the following point).
  • If you want to start a discussion with the author, please use the developer contact information. They can usually be found in the description.
Please choose a rating from 1 to 5 for this module.
Error instaling in ODOO V12
by
Jefry Suarez
on 5/7/20, 2:10 PM

Hi, try to install in ODOO v12 ENTERPRISE Error: Odoo Server Error Traceback (most recent call last): File "/opt/odoo/odoo/odoo/models.py", line 1108, in _validate_fields check(self) File "/opt/odoo/odoo/odoo/addons/base/models/ir_ui_view.py", line 351, in _check_xml self.postprocess_and_fields(view.model, view_doc, view.id) File "/opt/odoo/odoo/odoo/addons/base/models/ir_ui_view.py", line 1109, in postprocess_and_fields self.raise_view_error("\n".join(msg_lines), view_id) File "/opt/odoo/odoo/odoo/addons/base/models/ir_ui_view.py", line 548, in raise_view_error raise ValueError(message) ValueError: El campo 'ks_amount_discount' utilizado en los atributos debe estar presente en la vista pero falta: - 'ks_amount_discount' in attrs="{'invisible':[('ks_enable_discount','!=',True),('ks_amount_discount','=',0)], 'readonly':[('ks_enable_discount','!=',True),('ks_amount_discount','!=',0)]}" - 'ks_amount_discount' in attrs="{'invisible':[('ks_enable_discount','!=',True),('ks_amount_discount','=',0)], 'readonly':[('ks_enable_discount','!=',True),('ks_amount_discount','!=',0)]}" - 'ks_amount_discount' in attrs="{'invisible':[('ks_enable_discount','!=',True),('ks_amount_discount','=',0)],'readonly':[('ks_enable_discount','!=',True),('ks_amount_discount','!=',0)]}" - 'ks_amount_discount' in attrs="{'invisible':[('ks_enable_discount','!=',True),('ks_amount_discount','=',0)],'readonly':[('ks_enable_discount','!=',True),('ks_amount_discount','!=',0)]}" - 'ks_amount_discount' in attrs="{'invisible':[('ks_enable_discount','!=',True),('ks_amount_discount','=',0)]}" - 'ks_amount_discount' in attrs="{'invisible':[('ks_enable_discount','!=',True),('ks_amount_discount','=',0)]}"

Re: Error instaling in ODOO V12
by
Cybrosys Technologies
on 5/7/20, 10:58 PM Author

Please make sure you are using this module or not, because, we don't have a 'ks_amount_discount' in our module.


Bug fix advice
by
zhuwangwen
on 6/21/19, 3:24 AM

In models/account_invoice.py,the _convert method should add conpany and date positional arguments. So the code in line 41 and 42 should be "amount_total_company_signed = currency_id._convert(self.amount_total,self.company_id.currency_id,self.company_id, self.date_invoice) amount_untaxed_signed = currency_id._convert(self.amount_untaxed,self.company_id.currency_id,self.company_id, self.date_invoice)".


Cannot install the module on v12
by
Jan Navarro
on 4/30/19, 12:20 AM

Odoo Server Error Traceback (most recent call last): File "C:\Program Files (x86)\Odoo 12.0\server\odoo\api.py", line 1039, in get value = self._data[key][field][record._ids[0]] KeyError: 5 During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\Program Files (x86)\Odoo 12.0\server\odoo\fields.py", line 976, in __get__ value = record.env.cache.get(record, self) File "C:\Program Files (x86)\Odoo 12.0\server\odoo\api.py", line 1041, in get raise CacheMiss(record, field) odoo.exceptions.CacheMiss: ('account.invoice(5,).amount_discount', None)


Report issue Fixed
by
Cybrosys Technologies
on 1/7/19, 5:49 AM Author

Sorry for the trouble, Issue Fixed


impossible to export to pdf
by
xmz
on 1/1/19, 5:12 AM

This addon is exactly what i was looking for, but i can not use it because of a bug : impossible to export the invoice in pdf. :( Error to render compiling AST AttributeError: 'str' object has no attribute 'decimal_places' Template: account.report_invoice_document_with_payments Path: /templates/t/t/div/div[2]/div/div/table/tr[2]/td[2]/span Node: I must look for another one.


Error when install in odoo 12(multi company)
by
zhuwangwen
on 6/21/19, 1:34 AM

Error: Odoo Server Error Traceback (most recent call last): File "/home/odoo/odoo/odoo/api.py", line 1039, in get value = self._data[key][field][record.id] KeyError: 2 During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/odoo/odoo/odoo/fields.py", line 963, in __get__ value = record.env.cache.get(record, self) File "/home/odoo/odoo/odoo/api.py", line 1041, in get raise CacheMiss(record, field) odoo.exceptions.CacheMiss: ('account.invoice(2,).amount_discount', None) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/odoo/odoo/odoo/http.py", line 654, in _handle_exception return super(JsonRequest, self)._handle_exception(exception) File "/home/odoo/odoo/odoo/http.py", line 312, in _handle_exception raise pycompat.reraise(type(exception), exception, sys.exc_info()[2]) File "/home/odoo/odoo/odoo/tools/pycompat.py", line 87, in reraise raise value File "/home/odoo/odoo/odoo/http.py", line 696, in dispatch result = self._call_function(**self.params) File "/home/odoo/odoo/odoo/http.py", line 344, in _call_function return checked_call(self.db, *args, **kwargs) File "/home/odoo/odoo/odoo/service/model.py", line 97, in wrapper return f(dbname, *args, **kwargs) File "/home/odoo/odoo/odoo/http.py", line 337, in checked_call result = self.endpoint(*a, **kw) File "/home/odoo/odoo/odoo/http.py", line 939, in __call__ return self.method(*args, **kw) File "/home/odoo/odoo/odoo/http.py", line 517, in response_wrap response = f(*args, **kw) File "/home/odoo/odoo/odoo/addons/web/controllers/main.py", line 966, in call_button action = self._call_kw(model, method, args, {}) File "/home/odoo/odoo/odoo/addons/web/controllers/main.py", line 954, in _call_kw return call_kw(request.env[model], method, args, kwargs) File "/home/odoo/odoo/odoo/api.py", line 749, in call_kw return _call_kw_multi(method, model, args, kwargs) File "/home/odoo/odoo/odoo/api.py", line 736, in _call_kw_multi result = method(recs, *args, **kwargs) File "", line 2, in button_immediate_install File "/home/odoo/odoo/odoo/addons/base/models/ir_module.py", line 73, in check_and_log return method(self, *args, **kwargs) File "/home/odoo/odoo/odoo/addons/base/models/ir_module.py", line 444, in button_immediate_install return self._button_immediate_function(type(self).button_install) File "/home/odoo/odoo/odoo/addons/base/models/ir_module.py", line 553, in _button_immediate_function modules.registry.Registry.new(self._cr.dbname, update_module=True) File "/home/odoo/odoo/odoo/modules/registry.py", line 86, in new odoo.modules.load_modules(registry._db, force_demo, status, update_module) File "/home/odoo/odoo/odoo/modules/loading.py", line 421, in load_modules loaded_modules, update_module, models_to_check) File "/home/odoo/odoo/odoo/modules/loading.py", line 313, in load_marked_modules perform_checks=perform_checks, models_to_check=models_to_check File "/home/odoo/odoo/odoo/modules/loading.py", line 195, in load_module_graph registry.init_models(cr, model_names, {'module': package.name}) File "/home/odoo/odoo/odoo/modules/registry.py", line 304, in init_models models[0].recompute() File "/home/odoo/odoo/odoo/models.py", line 5218, in recompute vals = {n: rec[n] for n in ns} File "/home/odoo/odoo/odoo/models.py", line 5218, in vals = {n: rec[n] for n in ns} File "/home/odoo/odoo/odoo/models.py", line 5065, in __getitem__ return self._fields[key].__get__(self, type(self)) File "/home/odoo/odoo/odoo/fields.py", line 967, in __get__ self.determine_value(record) File "/home/odoo/odoo/odoo/fields.py", line 1054, in determine_value self.compute_value(recs) File "/home/odoo/odoo/odoo/fields.py", line 1034, in compute_value self._compute_value(records) File "/home/odoo/odoo/odoo/fields.py", line 1025, in _compute_value getattr(records, self.compute)() File "", line 2, in _compute_amount File "/home/odoo/odoo/odoo/api.py", line 372, in loop result = [method(rec, *args, **kwargs) for rec in self] File "/home/odoo/odoo/odoo/api.py", line 372, in result = [method(rec, *args, **kwargs) for rec in self] File "/home/odoo/odoo/myaddons/sale_discount_total/models/account_invoice.py", line 41, in _compute_amount amount_total_company_signed = currency_id._convert(self.amount_total, self.company_id.currency_id) TypeError: _convert() missing 2 required positional arguments: 'company' and 'date'


Does not install on odoo 12 community edition
by
Adrian Maudsley
on 1/19/19, 5:31 PM

Odoo Server Error Traceback (most recent call last): File "/opt/bitnami/apps/odoo/lib/odoo-12.0.post20181218-py3.7.egg/odoo/api.py", line 1032, in get value = self._data[field][record.id][key] KeyError: During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/opt/bitnami/apps/odoo/lib/odoo-12.0.post20181218-py3.7.egg/odoo/fields.py", line 970, in __get__ value = record.env.cache.get(record, self) File "/opt/bitnami/apps/odoo/lib/odoo-12.0.post20181218-py3.7.egg/odoo/api.py", line 1034, in get raise CacheMiss(record, field) odoo.exceptions.CacheMiss: ('account.invoice(24,).amount_discount', None)