@ -0,0 +1,44 @@ |
|||||
|
.. image:: https://img.shields.io/badge/license-AGPL--3-blue.svg |
||||
|
:target: https://www.gnu.org/licenses/agpl-3.0-standalone.html |
||||
|
:alt: License: AGPL-3 |
||||
|
|
||||
|
Manual Currency Exchange Rate |
||||
|
============================= |
||||
|
The currency rate can be manually changed in sales, purchases, and invoices by |
||||
|
utilizing this module. |
||||
|
|
||||
|
Installation |
||||
|
============ |
||||
|
- www.odoo.com/documentation/17.0/setup/install.html |
||||
|
- Install our custom addon |
||||
|
|
||||
|
Company |
||||
|
------- |
||||
|
* `Cybrosys Techno Solutions <https://cybrosys.com/>`__ |
||||
|
|
||||
|
License |
||||
|
------- |
||||
|
General Public License, Version 3 (AGPL v3). |
||||
|
(https://www.gnu.org/licenses/agpl-3.0-standalone.html) |
||||
|
|
||||
|
Credits |
||||
|
------- |
||||
|
Developer: (V17)Anfas Faisal K, (V18) Farook Al Ameen, Contact: odoo@cybrosys.com |
||||
|
|
||||
|
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 |
||||
|
|
||||
|
Further information |
||||
|
=================== |
||||
|
HTML Description: `<static/description/index.html>`__ |
@ -0,0 +1,22 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
################################################################################ |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# |
||||
|
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
||||
|
# Author: Farook Al Ameen (odoo@cybrosys.info) |
||||
|
# |
||||
|
# 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 <http://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
################################################################################ |
||||
|
from . import models |
@ -0,0 +1,48 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
################################################################################ |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# |
||||
|
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
||||
|
# Author: Farook Al Ameen (odoo@cybrosys.info) |
||||
|
# |
||||
|
# 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 <http://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
################################################################################ |
||||
|
{ |
||||
|
'name': "Manual Currency Exchange Rate", |
||||
|
'version': '18.0.1.0.0', |
||||
|
'category': 'Accounting', |
||||
|
'summary': """By using this module ,we can change the currency rate manually |
||||
|
in sale ,purchase and invoice. """, |
||||
|
'description': """By using this module, we can manually adjust the currency |
||||
|
rate for key aspects of our business operations, including sales, |
||||
|
purchases, and invoicing. This feature gives us the power to have precise |
||||
|
control over currency conversions and adapt quickly to fluctuating |
||||
|
exchange rates.""", |
||||
|
'author': 'Cybrosys Techno Solutions', |
||||
|
'company': 'Cybrosys Techno Solutions', |
||||
|
'maintainer': 'Cybrosys Techno Solutions', |
||||
|
'website': 'https://www.cybrosys.com', |
||||
|
'depends': ['base', 'purchase', 'sale_management', 'account'], |
||||
|
'data': [ |
||||
|
'views/account_move_views.xml', |
||||
|
'views/purchase_order_views.xml', |
||||
|
'views/sale_order_views.xml' |
||||
|
], |
||||
|
'images': ['static/description/banner.gif'], |
||||
|
'license': 'AGPL-3', |
||||
|
'installable': True, |
||||
|
'auto_install': False, |
||||
|
'application': False, |
||||
|
} |
@ -0,0 +1,7 @@ |
|||||
|
## Module <exchange_currency_rate> |
||||
|
|
||||
|
#### 26.06.2024 |
||||
|
#### Version 18.0.1.0.0 |
||||
|
#### ADD |
||||
|
|
||||
|
- Initial commit for Manual Currency Exchange Rate |
@ -0,0 +1,24 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
################################################################################ |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# |
||||
|
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
||||
|
# Author: Farook Al Ameen (odoo@cybrosys.info) |
||||
|
# |
||||
|
# 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 <http://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
################################################################################ |
||||
|
from . import account_move |
||||
|
from . import purchase_order |
||||
|
from . import sale_order |
@ -0,0 +1,51 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
################################################################################ |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# |
||||
|
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
||||
|
# Author: Farook Al Ameen (odoo@cybrosys.info) |
||||
|
# |
||||
|
# 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 <http://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
################################################################################ |
||||
|
from odoo import api, fields, models |
||||
|
|
||||
|
|
||||
|
class AccountMove(models.Model): |
||||
|
"""This class extends the base 'purchase.order' model to introduce a new |
||||
|
field, 'is_exchange',which allows users to manually apply an exchange |
||||
|
rate for a transaction. When this option is enabled,users can specify |
||||
|
the exchange rate through the 'rate' field.""" |
||||
|
_inherit = 'account.move' |
||||
|
|
||||
|
is_exchange = fields.Boolean(string='Apply Manual Exchange', |
||||
|
help='Check this box if you want to manually ' |
||||
|
'apply an exchange rate for this ' |
||||
|
'transaction.') |
||||
|
rate = fields.Float(string='Rate', help='specify the rate', |
||||
|
compute='_compute_rate', readonly=False, store=True, |
||||
|
default=1) |
||||
|
|
||||
|
@api.depends('invoice_line_ids.product_id') |
||||
|
def _compute_rate(self): |
||||
|
"""Changing the unit price of product by changing the rate.""" |
||||
|
for rec in self: |
||||
|
if rec.move_type == 'out_invoice': |
||||
|
if len(rec.invoice_line_ids) >= 1 and rec.is_exchange: |
||||
|
rec.invoice_line_ids[-1].price_unit = rec.invoice_line_ids[ |
||||
|
-1].product_id.list_price * rec.rate |
||||
|
elif rec.move_type == 'in_invoice': |
||||
|
if len(rec.invoice_line_ids) >= 1 and rec.is_exchange: |
||||
|
rec.invoice_line_ids[-1].price_unit = rec.invoice_line_ids[ |
||||
|
-1].product_id.standard_price * rec.rate |
@ -0,0 +1,45 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
################################################################################ |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# |
||||
|
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
||||
|
# Author: Farook Al Ameen (odoo@cybrosys.info) |
||||
|
# |
||||
|
# 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 <http://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
################################################################################ |
||||
|
from odoo import api, fields, models |
||||
|
|
||||
|
|
||||
|
class PurchaseOrder(models.Model): |
||||
|
"""This class extends the base 'purchase.order' model to introduce a |
||||
|
new field, 'is_exchange',which allows users to manually apply an exchange |
||||
|
rate for a transaction. When this option is enabled, users can specify |
||||
|
the exchange rate through the 'rate' field.""" |
||||
|
_inherit = 'purchase.order' |
||||
|
|
||||
|
is_exchange = fields.Boolean(string='Apply Manual Currency', |
||||
|
help='Check this box if you want to manually' |
||||
|
'apply an exchange rate for this ' |
||||
|
'transaction.') |
||||
|
rate = fields.Float(string='Rate', help='specify the rate', compute='_compute_rate', readonly=False, store=True, |
||||
|
default=1) |
||||
|
|
||||
|
@api.depends('order_line.product_id') |
||||
|
def _compute_rate(self): |
||||
|
"""Changing the unit price of product by changing the rate.""" |
||||
|
for rec in self: |
||||
|
if len(rec.order_line) >= 1 and rec.is_exchange: |
||||
|
rec.order_line[-1].price_unit = rec.order_line[ |
||||
|
-1].product_id.standard_price * rec.rate |
@ -0,0 +1,45 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
################################################################################ |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# |
||||
|
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
||||
|
# Author: Farook Al Ameen (odoo@cybrosys.info) |
||||
|
# |
||||
|
# 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 <http://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
################################################################################ |
||||
|
from odoo import api, fields, models |
||||
|
|
||||
|
|
||||
|
class SaleOrder(models.Model): |
||||
|
"""This class extends the base 'sale.order' model to introduce a |
||||
|
new field, 'is_exchange',which allows users to manually apply an exchange |
||||
|
rate for a transaction. When this option is enabled,users can specify the |
||||
|
exchange rate through the 'rate' field.""" |
||||
|
_inherit = 'sale.order' |
||||
|
|
||||
|
is_exchange = fields.Boolean(string='Apply Manual Currency', |
||||
|
help='Enable the boolean field to display ' |
||||
|
'rate field') |
||||
|
rate = fields.Float(string='Rate', help='specify the currency rate', |
||||
|
compute='_compute_rate', readonly=False, store=True, |
||||
|
default=1) |
||||
|
|
||||
|
@api.depends('order_line.product_id') |
||||
|
def _compute_rate(self): |
||||
|
"""Changing the unit price of product by changing the rate.""" |
||||
|
for rec in self: |
||||
|
if len(rec.order_line) >= 1 and rec.is_exchange: |
||||
|
rec.order_line[-1].price_unit = rec.order_line[ |
||||
|
-1].product_id.list_price * rec.rate |
After Width: | Height: | Size: 2.2 KiB |
After Width: | Height: | Size: 28 KiB |
After Width: | Height: | Size: 628 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 210 KiB |
After Width: | Height: | Size: 209 KiB |
After Width: | Height: | Size: 109 KiB |
After Width: | Height: | Size: 495 B |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 624 B |
After Width: | Height: | Size: 136 KiB |
After Width: | Height: | Size: 214 KiB |
After Width: | Height: | Size: 36 KiB |
After Width: | Height: | Size: 3.6 KiB |
After Width: | Height: | Size: 310 B |
After Width: | Height: | Size: 929 B |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 3.3 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 17 KiB |
After Width: | Height: | Size: 542 B |
After Width: | Height: | Size: 576 B |
After Width: | Height: | Size: 733 B |
After Width: | Height: | Size: 4.3 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 4.0 KiB |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 250 KiB |
After Width: | Height: | Size: 2.2 KiB |
After Width: | Height: | Size: 911 B |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 600 B |
After Width: | Height: | Size: 673 B |
After Width: | Height: | Size: 2.0 KiB |
After Width: | Height: | Size: 462 B |
After Width: | Height: | Size: 2.1 KiB |
After Width: | Height: | Size: 926 B |
After Width: | Height: | Size: 9.0 KiB |
After Width: | Height: | Size: 23 KiB |
After Width: | Height: | Size: 7.0 KiB |
After Width: | Height: | Size: 878 B |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 653 B |
After Width: | Height: | Size: 800 B |
After Width: | Height: | Size: 905 B |
After Width: | Height: | Size: 189 KiB |
After Width: | Height: | Size: 4.3 KiB |
After Width: | Height: | Size: 839 B |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 5.9 KiB |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 34 KiB |
After Width: | Height: | Size: 26 KiB |
After Width: | Height: | Size: 3.8 KiB |
After Width: | Height: | Size: 23 KiB |
After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 2.3 KiB |
After Width: | Height: | Size: 427 B |
After Width: | Height: | Size: 627 B |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 988 B |
After Width: | Height: | Size: 3.7 KiB |
After Width: | Height: | Size: 5.0 KiB |
After Width: | Height: | Size: 875 B |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 912 KiB |
After Width: | Height: | Size: 1.3 MiB |
After Width: | Height: | Size: 46 KiB |
After Width: | Height: | Size: 44 KiB |
After Width: | Height: | Size: 46 KiB |
After Width: | Height: | Size: 85 KiB |
After Width: | Height: | Size: 146 KiB |
After Width: | Height: | Size: 174 KiB |
After Width: | Height: | Size: 148 KiB |
After Width: | Height: | Size: 179 KiB |
After Width: | Height: | Size: 125 KiB |
After Width: | Height: | Size: 139 KiB |
After Width: | Height: | Size: 153 KiB |
After Width: | Height: | Size: 164 KiB |
After Width: | Height: | Size: 880 KiB |
After Width: | Height: | Size: 94 KiB |
After Width: | Height: | Size: 14 KiB |
@ -0,0 +1,17 @@ |
|||||
|
<?xml version="1.0" encoding="utf-8" ?> |
||||
|
<odoo> |
||||
|
<!-- Added new field in invoice--> |
||||
|
<record id="view_move_form" model="ir.ui.view"> |
||||
|
<field name="name">account.move.view.form.inherit.exchange.currency.rate</field> |
||||
|
<field name="model">account.move</field> |
||||
|
<field name="inherit_id" ref="account.view_move_form"/> |
||||
|
<field name="arch" type="xml"> |
||||
|
<xpath expr="//field[@name='payment_reference']" |
||||
|
position='after'> |
||||
|
<field name="is_exchange"/> |
||||
|
<field name="rate" |
||||
|
invisible="is_exchange == False"/> |
||||
|
</xpath> |
||||
|
</field> |
||||
|
</record> |
||||
|
</odoo> |
@ -0,0 +1,16 @@ |
|||||
|
<?xml version="1.0" encoding="utf-8" ?> |
||||
|
<odoo> |
||||
|
<!-- Added new field in purchase order--> |
||||
|
<record id="purchase_order_form" model="ir.ui.view"> |
||||
|
<field name="name">purchase.order.view.form.inherit.exchange.currency.rate</field> |
||||
|
<field name="model">purchase.order</field> |
||||
|
<field name="inherit_id" ref="purchase.purchase_order_form"/> |
||||
|
<field name="arch" type="xml"> |
||||
|
<xpath expr="//field[@name='date_order']" position='after'> |
||||
|
<field name="is_exchange"/> |
||||
|
<field name="rate" |
||||
|
invisible="is_exchange == False"/> |
||||
|
</xpath> |
||||
|
</field> |
||||
|
</record> |
||||
|
</odoo> |
@ -0,0 +1,16 @@ |
|||||
|
<?xml version="1.0" encoding="utf-8" ?> |
||||
|
<odoo> |
||||
|
<!-- Added new field in sale order--> |
||||
|
<record id="view_order_form" model="ir.ui.view"> |
||||
|
<field name="name">sale.order.view.form.inherit.exchange.currency.rate</field> |
||||
|
<field name="model">sale.order</field> |
||||
|
<field name="inherit_id" ref="sale.view_order_form"/> |
||||
|
<field name="arch" type="xml"> |
||||
|
<xpath expr="//field[@name='payment_term_id']" position='after'> |
||||
|
<field name="is_exchange"/> |
||||
|
<field name="rate" |
||||
|
invisible="is_exchange == False"/> |
||||
|
</xpath> |
||||
|
</field> |
||||
|
</record> |
||||
|
</odoo> |