diff --git a/sale_discount_total/README.rst b/sale_discount_total/README.rst new file mode 100644 index 000000000..a2ec83167 --- /dev/null +++ b/sale_discount_total/README.rst @@ -0,0 +1,41 @@ +Sale Discount on Total Amount +============================= +Discount on Total in Sale and Invoice With Discount Limit and Approval + +Configuration +============= +* No additional configurations needed + +Company +------- +* `Cybrosys Techno Solutions `__ + +Credits +------- +* Developer: Faslu Rahman @cybrosys +* V14: Muhammed P @cybrosys +* V15: Sreerag E @cybrosys + +Contacts +-------- +* Mail Contact : odoo@cybrosys.com +* Website : https://cybrosys.com + +Bug Tracker +----------- +Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. + +Maintainer +========== +.. image:: https://cybrosys.com/images/logo.png + :target: https://cybrosys.com + +This module is maintained by Cybrosys Technologies. + +For support and more information, please visit `Our Website `__ + +Further information +=================== +HTML Description: ``__ + + diff --git a/sale_discount_total/__init__.py b/sale_discount_total/__init__.py new file mode 100644 index 000000000..f53800003 --- /dev/null +++ b/sale_discount_total/__init__.py @@ -0,0 +1,24 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2019-TODAY Cybrosys Technologies(). +# Author: Faslu Rahman(odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################# +from . import models +from . import reports + diff --git a/sale_discount_total/__manifest__.py b/sale_discount_total/__manifest__.py new file mode 100644 index 000000000..a7bed0a5d --- /dev/null +++ b/sale_discount_total/__manifest__.py @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2021-TODAY Cybrosys Technologies(). +# Author: Faslu Rahman(odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################# + +{ + 'name': 'Sale Discount on Total Amount', + 'version': '15.0.1.0.0', + 'category': 'Sales Management', + 'live_test_url': 'https://www.youtube.com/watch?v=CigmHe9iC4s&feature=youtu.be', + 'summary': "Discount on Total in Sale and Invoice With Discount Limit and Approval", + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'website': 'http://www.cybrosys.com', + 'description': """ + +Sale Discount for Total Amount +======================= +Module to manage discount on total amount in Sale. + as an specific amount or percentage +""", + 'depends': ['sale', + 'account', 'delivery' + ], + 'data': [ + 'views/sale_view.xml', + 'views/account_invoice_view.xml', + 'views/invoice_report.xml', + 'views/sale_order_report.xml', + 'views/res_config_view.xml', + + ], + 'images': ['static/description/banner.png'], + 'license': 'AGPL-3', + 'application': True, + 'installable': True, + 'auto_install': False, +} diff --git a/sale_discount_total/doc/RELEASE_NOTES.md b/sale_discount_total/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..690edfd40 --- /dev/null +++ b/sale_discount_total/doc/RELEASE_NOTES.md @@ -0,0 +1,9 @@ +## Module + +#### 10.09.2021 +#### Version 15.0.1.0.0 +#### ADD +Initial commit for Sale Discount On Total Amount + + + diff --git a/sale_discount_total/models/__init__.py b/sale_discount_total/models/__init__.py new file mode 100644 index 000000000..695e03083 --- /dev/null +++ b/sale_discount_total/models/__init__.py @@ -0,0 +1,25 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2019-TODAY Cybrosys Technologies(). +# Author: Faslu Rahman(odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################# +from . import sale +from . import account_invoice +from . import discount_approval + diff --git a/sale_discount_total/models/account_invoice.py b/sale_discount_total/models/account_invoice.py new file mode 100644 index 000000000..b6a43c6ac --- /dev/null +++ b/sale_discount_total/models/account_invoice.py @@ -0,0 +1,176 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2019-TODAY Cybrosys Technologies(). +# Author: Faslu Rahman(odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################# + +from odoo import api, fields, models + + +class AccountInvoice(models.Model): + _inherit = "account.move" + + @api.depends( + 'line_ids.matched_debit_ids.debit_move_id.move_id.line_ids.amount_residual', + 'line_ids.matched_debit_ids.debit_move_id.move_id.line_ids.amount_residual_currency', + 'line_ids.matched_credit_ids.credit_move_id.move_id.line_ids.amount_residual', + 'line_ids.matched_credit_ids.credit_move_id.move_id.line_ids.amount_residual_currency', + 'line_ids.debit', + 'line_ids.credit', + 'line_ids.currency_id', + 'line_ids.amount_currency', + 'line_ids.amount_residual', + 'line_ids.amount_residual_currency', + 'line_ids.payment_id.state', + 'line_ids.full_reconcile_id') + def _compute_amount(self): + for move in self: + + if move.payment_state == 'invoicing_legacy': + # invoicing_legacy state is set via SQL when setting setting field + # invoicing_switch_threshold (defined in account_accountant). + # The only way of going out of this state is through this setting, + # so we don't recompute it here. + move.payment_state = move.payment_state + continue + + total_untaxed = 0.0 + total_untaxed_currency = 0.0 + total_tax = 0.0 + total_tax_currency = 0.0 + total_to_pay = 0.0 + total_residual = 0.0 + total_residual_currency = 0.0 + total = 0.0 + total_currency = 0.0 + currencies = set() + + for line in move.line_ids: + if line.currency_id: + currencies.add(line.currency_id) + + if move.is_invoice(include_receipts=True): + # === Invoices === + + if not line.exclude_from_invoice_tab: + # Untaxed amount. + total_untaxed += line.balance + total_untaxed_currency += line.amount_currency + total += line.balance + total_currency += line.amount_currency + elif line.tax_line_id: + # Tax amount. + total_tax += line.balance + total_tax_currency += line.amount_currency + total += line.balance + total_currency += line.amount_currency + elif line.account_id.user_type_id.type in ('receivable', 'payable'): + # Residual amount. + total_to_pay += line.balance + total_residual += line.amount_residual + total_residual_currency += line.amount_residual_currency + else: + # === Miscellaneous journal entry === + if line.debit: + total += line.balance + total_currency += line.amount_currency + + if move.move_type == 'entry' or move.is_outbound(): + sign = 1 + else: + sign = -1 + if move.discount_type == 'percent': + move.amount_discount = sum((line.quantity * line.price_unit * line.discount) / 100 for line in move.invoice_line_ids) + else: + move.amount_discount = move.discount_rate + move.amount_untaxed = sign * (total_untaxed_currency if len(currencies) == 1 else total_untaxed) + move.amount_tax = sign * (total_tax_currency if len(currencies) == 1 else total_tax) + move.amount_total = sign * (total_currency if len(currencies) == 1 else total) + move.amount_residual = -sign * (total_residual_currency if len(currencies) == 1 else total_residual) + move.amount_untaxed_signed = -total_untaxed + move.amount_tax_signed = -total_tax + move.amount_total_signed = abs(total) if move.move_type == 'entry' else -total + move.amount_residual_signed = total_residual + + currency = len(currencies) == 1 and currencies.pop() or move.company_id.currency_id + + # Compute 'payment_state'. + new_pmt_state = 'not_paid' if move.move_type != 'entry' else False + + if move.is_invoice(include_receipts=True) and move.state == 'posted': + + if currency.is_zero(move.amount_residual): + if all(payment.is_matched for payment in move._get_reconciled_payments()): + new_pmt_state = 'paid' + else: + new_pmt_state = move._get_invoice_in_payment_state() + elif currency.compare_amounts(total_to_pay, total_residual) != 0: + new_pmt_state = 'partial' + + if new_pmt_state == 'paid' and move.move_type in ('in_invoice', 'out_invoice', 'entry'): + reverse_type = move.move_type == 'in_invoice' and 'in_refund' or move.move_type == 'out_invoice' and 'out_refund' or 'entry' + reverse_moves = self.env['account.move'].search( + [('reversed_entry_id', '=', move.id), ('state', '=', 'posted'), ('move_type', '=', reverse_type)]) + + # We only set 'reversed' state in cas of 1 to 1 full reconciliation with a reverse entry; otherwise, we use the regular 'paid' state + reverse_moves_full_recs = reverse_moves.mapped('line_ids.full_reconcile_id') + if reverse_moves_full_recs.mapped('reconciled_line_ids.move_id').filtered(lambda x: x not in ( + reverse_moves + reverse_moves_full_recs.mapped('exchange_move_id'))) == move: + new_pmt_state = 'reversed' + + move.payment_state = new_pmt_state + + discount_type = fields.Selection([('percent', 'Percentage'), ('amount', 'Amount')], string='Discount Type', + readonly=True, states={'draft': [('readonly', False)]}, default='percent') + discount_rate = fields.Float('Discount Amount', digits=(16, 2), readonly=True, + states={'draft': [('readonly', False)]}) + amount_discount = fields.Monetary(string='Discount', store=True, readonly=True, compute='_compute_amount', + track_visibility='always') + + @api.onchange('discount_type', 'discount_rate', 'invoice_line_ids') + def supply_rate(self): + for inv in self: + if inv.discount_type == 'percent': + for line in inv.line_ids: + line.discount = inv.discount_rate + line._onchange_price_subtotal() + else: + total = discount = 0.0 + for line in inv.invoice_line_ids: + total += (line.quantity * line.price_unit) + if inv.discount_rate != 0: + discount = (inv.discount_rate / total) * 100 + else: + discount = inv.discount_rate + for line in inv.line_ids: + line.discount = discount + line._onchange_price_subtotal() + + inv._compute_tax_totals_json() + # + + def button_dummy(self): + self.supply_rate() + return True + + +class AccountInvoiceLine(models.Model): + _inherit = "account.move.line" + + discount = fields.Float(string='Discount (%)', digits=(16, 20), default=0.0) diff --git a/sale_discount_total/models/discount_approval.py b/sale_discount_total/models/discount_approval.py new file mode 100644 index 000000000..160d6ecb4 --- /dev/null +++ b/sale_discount_total/models/discount_approval.py @@ -0,0 +1,82 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2019-TODAY Cybrosys Technologies(). +# Author: Faslu Rahman(odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################# + +from odoo import api, fields, models + + +class sale_discount(models.Model): + _inherit = 'sale.order' + + state = fields.Selection([ + ('draft', 'Quotation'), + ('sent', 'Quotation Sent'), + ('waiting', 'Waiting Approval'), + ('sale', 'Sales Order'), + ('done', 'Locked'), + ('cancel', 'Cancelled'), + ], string='Status', readonly=True, copy=False, index=True, track_visibility='onchange', default='draft') + + + def action_confirm(self): + discnt = 0.0 + no_line = 0.0 + if self.company_id.so_double_validation == 'two_step': + for line in self.order_line: + no_line += 1 + discnt += line.discount + discnt = (discnt / no_line) + if self.company_id.so_double_validation_limit and discnt > self.company_id.so_double_validation_limit: + self.state = 'waiting' + return True + super(sale_discount, self).action_confirm() + + + def action_approve(self): + super(sale_discount, self).action_confirm() + return True + + +class Company(models.Model): + _inherit = 'res.company' + + so_double_validation = fields.Selection([ + ('one_step', 'Confirm sale orders in one step'), + ('two_step', 'Get 2 levels of approvals to confirm a sale order') + ], string="Levels of Approvals", default='one_step', + help="Provide a double validation mechanism for sales discount") + + so_double_validation_limit = fields.Float(string="Percentage of Discount that requires double validation'", + help="Minimum discount percentage for which a double validation is required") + + +class ResDiscountSettings(models.TransientModel): + _inherit = 'res.config.settings' + + so_order_approval = fields.Boolean("Sale Discount Approval", default=lambda self: self.env.user.company_id.so_double_validation == 'two_step') + + so_double_validation = fields.Selection(related='company_id.so_double_validation',string="Levels of Approvals *", readonly=False) + so_double_validation_limit = fields.Float(string="Discount limit requires approval in %", + related='company_id.so_double_validation_limit', readonly=False) + + def set_values(self): + super(ResDiscountSettings, self).set_values() + self.so_double_validation = 'two_step' if self.so_order_approval else 'one_step' diff --git a/sale_discount_total/models/sale.py b/sale_discount_total/models/sale.py new file mode 100644 index 000000000..76cbc8cf5 --- /dev/null +++ b/sale_discount_total/models/sale.py @@ -0,0 +1,98 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2019-TODAY Cybrosys Technologies(). +# Author: Faslu Rahman(odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################# + +from odoo import api, fields, models +import odoo.addons.decimal_precision as dp + + +class SaleOrder(models.Model): + _inherit = "sale.order" + + @api.depends('order_line.price_total') + def _amount_all(self): + """ + Compute the total amounts of the SO. + """ + for order in self: + amount_untaxed = amount_tax = amount_discount = 0.0 + for line in order.order_line: + amount_untaxed += line.price_subtotal + amount_tax += line.price_tax + amount_discount += (line.product_uom_qty * line.price_unit * line.discount) / 100 + order.update({ + 'amount_untaxed': amount_untaxed, + 'amount_tax': amount_tax, + 'amount_discount': amount_discount, + 'amount_total': amount_untaxed + amount_tax, + }) + + discount_type = fields.Selection([('percent', 'Percentage'), ('amount', 'Amount')], string='Discount type', + readonly=True, + states={'draft': [('readonly', False)], 'sent': [('readonly', False)]}, + default='percent') + discount_rate = fields.Float('Discount Rate', digits=dp.get_precision('Account'), + readonly=True, states={'draft': [('readonly', False)], 'sent': [('readonly', False)]}) + amount_untaxed = fields.Monetary(string='Untaxed Amount', store=True, readonly=True, compute='_amount_all', + track_visibility='always') + amount_tax = fields.Monetary(string='Taxes', store=True, readonly=True, compute='_amount_all', + track_visibility='always') + amount_total = fields.Monetary(string='Total', store=True, readonly=True, compute='_amount_all', + track_visibility='always') + amount_discount = fields.Monetary(string='Discount', store=True, readonly=True, compute='_amount_all', + digits=dp.get_precision('Account'), track_visibility='always') + + @api.onchange('discount_type', 'discount_rate', 'order_line') + def supply_rate(self): + + for order in self: + if order.discount_type == 'percent': + for line in order.order_line: + line.discount = order.discount_rate + else: + total = discount = 0.0 + for line in order.order_line: + total += round((line.product_uom_qty * line.price_unit)) + if order.discount_rate != 0: + discount = (order.discount_rate / total) * 100 + else: + discount = order.discount_rate + for line in order.order_line: + line.discount = discount + + def _prepare_invoice(self, ): + invoice_vals = super(SaleOrder, self)._prepare_invoice() + invoice_vals.update({ + 'discount_type': self.discount_type, + 'discount_rate': self.discount_rate, + }) + return invoice_vals + + def button_dummy(self): + + self.supply_rate() + return True + + +class SaleOrderLine(models.Model): + _inherit = "sale.order.line" + + discount = fields.Float(string='Discount (%)', digits=(16, 20), default=0.0) diff --git a/sale_discount_total/reports/__init__.py b/sale_discount_total/reports/__init__.py new file mode 100644 index 000000000..119231c54 --- /dev/null +++ b/sale_discount_total/reports/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2019-TODAY Cybrosys Technologies(). +# Author: Faslu Rahman(odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################# +from . import invoice_report +from . import sale_report diff --git a/sale_discount_total/reports/invoice_report.py b/sale_discount_total/reports/invoice_report.py new file mode 100644 index 000000000..17c1b865c --- /dev/null +++ b/sale_discount_total/reports/invoice_report.py @@ -0,0 +1,35 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2019-TODAY Cybrosys Technologies(). +# Author: Faslu Rahman(odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################# + +from odoo import fields, models + + +class AccountInvoiceReport(models.Model): + _inherit = 'account.invoice.report' + + discount = fields.Float('Discount', readonly=True) + + def _select(self): + res = super(AccountInvoiceReport,self)._select() + select_str = res + """, line.discount AS discount """ + return select_str + diff --git a/sale_discount_total/reports/sale_report.py b/sale_discount_total/reports/sale_report.py new file mode 100644 index 000000000..a9b9a4451 --- /dev/null +++ b/sale_discount_total/reports/sale_report.py @@ -0,0 +1,36 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2019-TODAY Cybrosys Technologies(). +# Author: Faslu Rahman(odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################# + + +from odoo import fields, models + + +class DiscountSaleReport(models.Model): + _inherit = 'sale.report' + + discount = fields.Float('Discount', readonly=True) + + def _select(self): + res = super(DiscountSaleReport,self)._select() + select_str = res+""",sum(l.product_uom_qty / u.factor * u2.factor * cr.rate * l.price_unit * l.discount / 100.0) + as discount""" + return select_str diff --git a/sale_discount_total/static/description/assets/icons/check.png b/sale_discount_total/static/description/assets/icons/check.png new file mode 100644 index 000000000..c8e85f51d Binary files /dev/null and b/sale_discount_total/static/description/assets/icons/check.png differ diff --git a/sale_discount_total/static/description/assets/icons/chevron.png b/sale_discount_total/static/description/assets/icons/chevron.png new file mode 100644 index 000000000..2089293d6 Binary files /dev/null and b/sale_discount_total/static/description/assets/icons/chevron.png differ diff --git a/sale_discount_total/static/description/assets/icons/cogs.png b/sale_discount_total/static/description/assets/icons/cogs.png new file mode 100644 index 000000000..95d0bad62 Binary files /dev/null and b/sale_discount_total/static/description/assets/icons/cogs.png differ diff --git a/sale_discount_total/static/description/assets/icons/consultation.png b/sale_discount_total/static/description/assets/icons/consultation.png new file mode 100644 index 000000000..8319d4baa Binary files /dev/null and b/sale_discount_total/static/description/assets/icons/consultation.png differ diff --git a/sale_discount_total/static/description/assets/icons/ecom-black.png b/sale_discount_total/static/description/assets/icons/ecom-black.png new file mode 100644 index 000000000..a9385ff13 Binary files /dev/null and b/sale_discount_total/static/description/assets/icons/ecom-black.png differ diff --git a/sale_discount_total/static/description/assets/icons/education-black.png b/sale_discount_total/static/description/assets/icons/education-black.png new file mode 100644 index 000000000..3eb09b27b Binary files /dev/null and b/sale_discount_total/static/description/assets/icons/education-black.png differ diff --git a/sale_discount_total/static/description/assets/icons/hotel-black.png b/sale_discount_total/static/description/assets/icons/hotel-black.png new file mode 100644 index 000000000..130f613be Binary files /dev/null and b/sale_discount_total/static/description/assets/icons/hotel-black.png differ diff --git a/sale_discount_total/static/description/assets/icons/license.png b/sale_discount_total/static/description/assets/icons/license.png new file mode 100644 index 000000000..a5869797e Binary files /dev/null and b/sale_discount_total/static/description/assets/icons/license.png differ diff --git a/sale_discount_total/static/description/assets/icons/lifebuoy.png b/sale_discount_total/static/description/assets/icons/lifebuoy.png new file mode 100644 index 000000000..658d56ccc Binary files /dev/null and b/sale_discount_total/static/description/assets/icons/lifebuoy.png differ diff --git a/sale_discount_total/static/description/assets/icons/logo.png b/sale_discount_total/static/description/assets/icons/logo.png new file mode 100644 index 000000000..478462d3e Binary files /dev/null and b/sale_discount_total/static/description/assets/icons/logo.png differ diff --git a/sale_discount_total/static/description/assets/icons/manufacturing-black.png b/sale_discount_total/static/description/assets/icons/manufacturing-black.png new file mode 100644 index 000000000..697eb0e9f Binary files /dev/null and b/sale_discount_total/static/description/assets/icons/manufacturing-black.png differ diff --git a/sale_discount_total/static/description/assets/icons/pos-black.png b/sale_discount_total/static/description/assets/icons/pos-black.png new file mode 100644 index 000000000..97c0f90c1 Binary files /dev/null and b/sale_discount_total/static/description/assets/icons/pos-black.png differ diff --git a/sale_discount_total/static/description/assets/icons/puzzle.png b/sale_discount_total/static/description/assets/icons/puzzle.png new file mode 100644 index 000000000..65cf854e7 Binary files /dev/null and b/sale_discount_total/static/description/assets/icons/puzzle.png differ diff --git a/sale_discount_total/static/description/assets/icons/restaurant-black.png b/sale_discount_total/static/description/assets/icons/restaurant-black.png new file mode 100644 index 000000000..4a35eb939 Binary files /dev/null and b/sale_discount_total/static/description/assets/icons/restaurant-black.png differ diff --git a/sale_discount_total/static/description/assets/icons/service-black.png b/sale_discount_total/static/description/assets/icons/service-black.png new file mode 100644 index 000000000..301ab51cb Binary files /dev/null and b/sale_discount_total/static/description/assets/icons/service-black.png differ diff --git a/sale_discount_total/static/description/assets/icons/trading-black.png b/sale_discount_total/static/description/assets/icons/trading-black.png new file mode 100644 index 000000000..9398ba2f1 Binary files /dev/null and b/sale_discount_total/static/description/assets/icons/trading-black.png differ diff --git a/sale_discount_total/static/description/assets/icons/training.png b/sale_discount_total/static/description/assets/icons/training.png new file mode 100644 index 000000000..884ca024d Binary files /dev/null and b/sale_discount_total/static/description/assets/icons/training.png differ diff --git a/sale_discount_total/static/description/assets/icons/update.png b/sale_discount_total/static/description/assets/icons/update.png new file mode 100644 index 000000000..ecbc5a01a Binary files /dev/null and b/sale_discount_total/static/description/assets/icons/update.png differ diff --git a/sale_discount_total/static/description/assets/icons/user.png b/sale_discount_total/static/description/assets/icons/user.png new file mode 100644 index 000000000..6ffb23d9f Binary files /dev/null and b/sale_discount_total/static/description/assets/icons/user.png differ diff --git a/sale_discount_total/static/description/assets/icons/wrench.png b/sale_discount_total/static/description/assets/icons/wrench.png new file mode 100644 index 000000000..6c04dea0f Binary files /dev/null and b/sale_discount_total/static/description/assets/icons/wrench.png differ diff --git a/sale_discount_total/static/description/assets/modules/approval_image.png b/sale_discount_total/static/description/assets/modules/approval_image.png new file mode 100644 index 000000000..84fe94e80 Binary files /dev/null and b/sale_discount_total/static/description/assets/modules/approval_image.png differ diff --git a/sale_discount_total/static/description/assets/modules/budget_image.png b/sale_discount_total/static/description/assets/modules/budget_image.png new file mode 100644 index 000000000..fe6aa6fe4 Binary files /dev/null and b/sale_discount_total/static/description/assets/modules/budget_image.png differ diff --git a/sale_discount_total/static/description/assets/modules/export_image.png b/sale_discount_total/static/description/assets/modules/export_image.png new file mode 100644 index 000000000..4e4ea0e51 Binary files /dev/null and b/sale_discount_total/static/description/assets/modules/export_image.png differ diff --git a/sale_discount_total/static/description/assets/modules/magento_image.png b/sale_discount_total/static/description/assets/modules/magento_image.png new file mode 100644 index 000000000..39de0820f Binary files /dev/null and b/sale_discount_total/static/description/assets/modules/magento_image.png differ diff --git a/sale_discount_total/static/description/assets/modules/pos_image.png b/sale_discount_total/static/description/assets/modules/pos_image.png new file mode 100644 index 000000000..c5932894b Binary files /dev/null and b/sale_discount_total/static/description/assets/modules/pos_image.png differ diff --git a/sale_discount_total/static/description/assets/modules/shopify_image.png b/sale_discount_total/static/description/assets/modules/shopify_image.png new file mode 100644 index 000000000..c6d92c16d Binary files /dev/null and b/sale_discount_total/static/description/assets/modules/shopify_image.png differ diff --git a/sale_discount_total/static/description/assets/screenshots/hero.png b/sale_discount_total/static/description/assets/screenshots/hero.png new file mode 100644 index 000000000..a3991ce9b Binary files /dev/null and b/sale_discount_total/static/description/assets/screenshots/hero.png differ diff --git a/sale_discount_total/static/description/assets/screenshots/screenshot-1.png b/sale_discount_total/static/description/assets/screenshots/screenshot-1.png new file mode 100644 index 000000000..24f1fcbd0 Binary files /dev/null and b/sale_discount_total/static/description/assets/screenshots/screenshot-1.png differ diff --git a/sale_discount_total/static/description/assets/screenshots/screenshot-2.png b/sale_discount_total/static/description/assets/screenshots/screenshot-2.png new file mode 100644 index 000000000..83096c29d Binary files /dev/null and b/sale_discount_total/static/description/assets/screenshots/screenshot-2.png differ diff --git a/sale_discount_total/static/description/assets/screenshots/screenshot-3.png b/sale_discount_total/static/description/assets/screenshots/screenshot-3.png new file mode 100644 index 000000000..fabce434f Binary files /dev/null and b/sale_discount_total/static/description/assets/screenshots/screenshot-3.png differ diff --git a/sale_discount_total/static/description/assets/screenshots/screenshot-4.png b/sale_discount_total/static/description/assets/screenshots/screenshot-4.png new file mode 100644 index 000000000..846d5b0c9 Binary files /dev/null and b/sale_discount_total/static/description/assets/screenshots/screenshot-4.png differ diff --git a/sale_discount_total/static/description/banner.png b/sale_discount_total/static/description/banner.png new file mode 100644 index 000000000..004c61a9e Binary files /dev/null and b/sale_discount_total/static/description/banner.png differ diff --git a/sale_discount_total/static/description/cybro_logo.png b/sale_discount_total/static/description/cybro_logo.png new file mode 100644 index 000000000..bb309114c Binary files /dev/null and b/sale_discount_total/static/description/cybro_logo.png differ diff --git a/sale_discount_total/static/description/icon.png b/sale_discount_total/static/description/icon.png new file mode 100644 index 000000000..f547b1e8d Binary files /dev/null and b/sale_discount_total/static/description/icon.png differ diff --git a/sale_discount_total/static/description/images/approval.png b/sale_discount_total/static/description/images/approval.png new file mode 100644 index 000000000..846d5b0c9 Binary files /dev/null and b/sale_discount_total/static/description/images/approval.png differ diff --git a/sale_discount_total/static/description/images/banner_lifeline_for_task.jpeg b/sale_discount_total/static/description/images/banner_lifeline_for_task.jpeg new file mode 100644 index 000000000..4a467ea22 Binary files /dev/null and b/sale_discount_total/static/description/images/banner_lifeline_for_task.jpeg differ diff --git a/sale_discount_total/static/description/images/banner_project_report_xls_pdf.png b/sale_discount_total/static/description/images/banner_project_report_xls_pdf.png new file mode 100644 index 000000000..3c430a7eb Binary files /dev/null and b/sale_discount_total/static/description/images/banner_project_report_xls_pdf.png differ diff --git a/sale_discount_total/static/description/images/banner_project_status_report.png b/sale_discount_total/static/description/images/banner_project_status_report.png new file mode 100644 index 000000000..d1b689710 Binary files /dev/null and b/sale_discount_total/static/description/images/banner_project_status_report.png differ diff --git a/sale_discount_total/static/description/images/banner_subtask.jpeg b/sale_discount_total/static/description/images/banner_subtask.jpeg new file mode 100644 index 000000000..f2b224110 Binary files /dev/null and b/sale_discount_total/static/description/images/banner_subtask.jpeg differ diff --git a/sale_discount_total/static/description/images/banner_task_deadline_reminder.jpeg b/sale_discount_total/static/description/images/banner_task_deadline_reminder.jpeg new file mode 100644 index 000000000..998679818 Binary files /dev/null and b/sale_discount_total/static/description/images/banner_task_deadline_reminder.jpeg differ diff --git a/sale_discount_total/static/description/images/banner_task_statusbar.jpeg b/sale_discount_total/static/description/images/banner_task_statusbar.jpeg new file mode 100644 index 000000000..2c57cbb7b Binary files /dev/null and b/sale_discount_total/static/description/images/banner_task_statusbar.jpeg differ diff --git a/sale_discount_total/static/description/images/checked.png b/sale_discount_total/static/description/images/checked.png new file mode 100644 index 000000000..578cedb80 Binary files /dev/null and b/sale_discount_total/static/description/images/checked.png differ diff --git a/sale_discount_total/static/description/images/customer invoice.png b/sale_discount_total/static/description/images/customer invoice.png new file mode 100644 index 000000000..83096c29d Binary files /dev/null and b/sale_discount_total/static/description/images/customer invoice.png differ diff --git a/sale_discount_total/static/description/images/customer _invoice-1.png b/sale_discount_total/static/description/images/customer _invoice-1.png new file mode 100644 index 000000000..a3991ce9b Binary files /dev/null and b/sale_discount_total/static/description/images/customer _invoice-1.png differ diff --git a/sale_discount_total/static/description/images/cybrosys.png b/sale_discount_total/static/description/images/cybrosys.png new file mode 100644 index 000000000..d76b5bafb Binary files /dev/null and b/sale_discount_total/static/description/images/cybrosys.png differ diff --git a/sale_discount_total/static/description/images/sale order.png b/sale_discount_total/static/description/images/sale order.png new file mode 100644 index 000000000..24f1fcbd0 Binary files /dev/null and b/sale_discount_total/static/description/images/sale order.png differ diff --git a/sale_discount_total/static/description/images/settings.png b/sale_discount_total/static/description/images/settings.png new file mode 100644 index 000000000..fabce434f Binary files /dev/null and b/sale_discount_total/static/description/images/settings.png differ diff --git a/sale_discount_total/static/description/index.html b/sale_discount_total/static/description/index.html new file mode 100644 index 000000000..7fdbc4093 --- /dev/null +++ b/sale_discount_total/static/description/index.html @@ -0,0 +1,602 @@ + +
+
+
+
+ +
+
+
+ Community +
+
+ Enterprise +
+ +
+
+
+
+ +
+
+
+

+ Global Discount In Sale

+

+ Global Discount In Sale +

+ +
+
+ + + + +
+
+

+ Overview +

+
+ +
+

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

+ +
+
+ + +
+
+

+ Features +

+
+ +
+
+ +
+
+

+ Community & Enterprise Support

+

+ Available in Odoo 15.0 Community and Enterprise.

+
+
+
+
+ +
+
+

+ Global Discount In Sale

+

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

+

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

+
+
+ +
+ +
+
+

+ 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.

+ + +
+ + +
+ + + +
+
+

Suggested Products

+
+ + +
+
+ + + +
+
+
+

Our Services

+
+
+ +
+
+ +
+
+ Odoo + Customization
+
+ +
+
+ +
+
+ Odoo + Implementation
+
+ +
+
+ +
+
+ Odoo + Support
+
+ + +
+
+ +
+
+ Hire + Odoo + Developer
+
+ +
+
+ +
+
+ Odoo + Integration
+
+ +
+
+ +
+
+ Odoo + Migration
+
+ + +
+
+ +
+
+ Odoo + Consultancy
+
+ +
+
+ +
+
+ Odoo + Implementation
+
+ +
+
+ +
+
+ Odoo + Licensing Consultancy
+
+
+
+ + + +
+
+
+

Our Industries

+
+
+ +
+
+ +
+ Trading +
+

+ Easily procure + and + sell your products

+
+
+ +
+
+ +
+ POS +
+

+ Easy + configuration + and convivial experience

+
+
+ +
+
+ +
+ Education +
+

+ A platform for + educational management

+
+
+ +
+
+ +
+ Manufacturing +
+

+ Plan, track and + schedule your operations

+
+
+ +
+
+ +
+ E-commerce & Website +
+

+ Mobile + friendly, + awe-inspiring product pages

+
+
+ +
+
+ +
+ Service Management +
+

+ Keep track of + services and invoice

+
+
+ +
+
+ +
+ Restaurant +
+

+ Run your bar or + restaurant methodically

+
+
+ +
+
+ +
+ Hotel Management +
+

+ An + all-inclusive + hotel management application

+
+
+ +
+
+ + + + + +
+
+
+

Need Help?

+
+
+
+ + +
+ +
+ +
+ +
+ WhatsApp +
+
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+
+
+ + +
\ No newline at end of file diff --git a/sale_discount_total/views/account_invoice_view.xml b/sale_discount_total/views/account_invoice_view.xml new file mode 100644 index 000000000..f64cc938b --- /dev/null +++ b/sale_discount_total/views/account_invoice_view.xml @@ -0,0 +1,41 @@ + + + + + + discount.account.invoice + account.move + + + + [16, 2] + + + + + +
+
+
+
+
+
+
+ + + + + + + + + + + + +
+
diff --git a/sale_discount_total/views/invoice_report.xml b/sale_discount_total/views/invoice_report.xml new file mode 100644 index 000000000..fbec17e61 --- /dev/null +++ b/sale_discount_total/views/invoice_report.xml @@ -0,0 +1,20 @@ + + + + + + + + diff --git a/sale_discount_total/views/res_config_view.xml b/sale_discount_total/views/res_config_view.xml new file mode 100644 index 000000000..c9f7d5fc8 --- /dev/null +++ b/sale_discount_total/views/res_config_view.xml @@ -0,0 +1,33 @@ + + + + res.config.settings.view.form.inherit.sale.discount + res.config.settings + + + + + +
+
+ +
+
+
+
+ +
+
+
+
diff --git a/sale_discount_total/views/sale_order_report.xml b/sale_discount_total/views/sale_order_report.xml new file mode 100644 index 000000000..f58141762 --- /dev/null +++ b/sale_discount_total/views/sale_order_report.xml @@ -0,0 +1,21 @@ + + + + + + + + \ No newline at end of file diff --git a/sale_discount_total/views/sale_view.xml b/sale_discount_total/views/sale_view.xml new file mode 100644 index 000000000..d6087d7a0 --- /dev/null +++ b/sale_discount_total/views/sale_view.xml @@ -0,0 +1,53 @@ + + + + + + discount.sale.order.form + sale.order + + + +