odoo-addon-account-manual-currency 15.0.1.0.0.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,95 @@
1
+ =========================
2
+ Account - Manual Currency
3
+ =========================
4
+
5
+ ..
6
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
7
+ !! This file is generated by oca-gen-addon-readme !!
8
+ !! changes will be overwritten. !!
9
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
10
+ !! source digest: sha256:35466de2e1eddf226817cd39139b497344396512b366f5bd4be981453e5b8721
11
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
12
+
13
+ .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
14
+ :target: https://odoo-community.org/page/development-status
15
+ :alt: Beta
16
+ .. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
17
+ :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
18
+ :alt: License: AGPL-3
19
+ .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Faccount--invoicing-lightgray.png?logo=github
20
+ :target: https://github.com/OCA/account-invoicing/tree/15.0/account_manual_currency
21
+ :alt: OCA/account-invoicing
22
+ .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
23
+ :target: https://translation.odoo-community.org/projects/account-invoicing-15-0/account-invoicing-15-0-account_manual_currency
24
+ :alt: Translate me on Weblate
25
+ .. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
26
+ :target: https://runboat.odoo-community.org/builds?repo=OCA/account-invoicing&target_branch=15.0
27
+ :alt: Try me on Runboat
28
+
29
+ |badge1| |badge2| |badge3| |badge4| |badge5|
30
+
31
+ This module allows users to update the currency manually for invoices that are still in the draft stage.
32
+ It offers flexibility to companies when calculating currency rates for invoicing.
33
+
34
+ For example, if a company makes a deal with a vendor but the actual purchase happens on a different day,
35
+ this module lets them choose whether to use the currency rate from the accounting date
36
+ or a special rate agreed upon during the deal.
37
+ This ensures accurate currency rate calculations for invoices,
38
+ even when the purchase date and deal date differ.
39
+
40
+ **Table of contents**
41
+
42
+ .. contents::
43
+ :local:
44
+
45
+ Usage
46
+ =====
47
+
48
+ To use this module, the company must have access rights for multiple currencies.
49
+
50
+ Follow these steps to use manual currency:
51
+
52
+ #. Go to Invoicing > Create new invoice/bills.
53
+ #. If you need to change the currency to one other than the company's default currency, you will see an option for 'Manual Currency'.
54
+ #. Check the 'Manual Currency' box to enable manual currency entry.
55
+ #. Specify the desired currency rate for the selected currency.
56
+
57
+ Bug Tracker
58
+ ===========
59
+
60
+ Bugs are tracked on `GitHub Issues <https://github.com/OCA/account-invoicing/issues>`_.
61
+ In case of trouble, please check there if your issue has already been reported.
62
+ If you spotted it first, help us to smash it by providing a detailed and welcomed
63
+ `feedback <https://github.com/OCA/account-invoicing/issues/new?body=module:%20account_manual_currency%0Aversion:%2015.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
64
+
65
+ Do not contact contributors directly about support or help with technical issues.
66
+
67
+ Credits
68
+ =======
69
+
70
+ Authors
71
+ ~~~~~~~
72
+
73
+ * Ecosoft
74
+
75
+ Contributors
76
+ ~~~~~~~~~~~~
77
+
78
+ * Saran Lim. <saranl@ecosoft.co.th>
79
+
80
+ Maintainers
81
+ ~~~~~~~~~~~
82
+
83
+ This module is maintained by the OCA.
84
+
85
+ .. image:: https://odoo-community.org/logo.png
86
+ :alt: Odoo Community Association
87
+ :target: https://odoo-community.org
88
+
89
+ OCA, or the Odoo Community Association, is a nonprofit organization whose
90
+ mission is to support the collaborative development of Odoo features and
91
+ promote its widespread use.
92
+
93
+ This module is part of the `OCA/account-invoicing <https://github.com/OCA/account-invoicing/tree/15.0/account_manual_currency>`_ project on GitHub.
94
+
95
+ You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
@@ -0,0 +1,4 @@
1
+ # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
2
+
3
+ from . import models
4
+ from . import wizard
@@ -0,0 +1,16 @@
1
+ # Copyright 2023 Ecosoft Co., Ltd. (http://ecosoft.co.th)
2
+ # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
3
+
4
+ {
5
+ "name": "Account - Manual Currency",
6
+ "version": "15.0.1.0.0",
7
+ "category": "Accounting & Finance",
8
+ "summary": "Allows to manual currency of Accounting",
9
+ "author": "Ecosoft, Odoo Community Association (OCA)",
10
+ "website": "https://github.com/OCA/account-invoicing",
11
+ "license": "AGPL-3",
12
+ "depends": ["account"],
13
+ "data": ["data/decimal_data.xml", "views/account_move_view.xml"],
14
+ "installable": True,
15
+ "maintainer": ["Saran440"],
16
+ }
@@ -0,0 +1,7 @@
1
+ <?xml version="1.0" encoding="utf-8" ?>
2
+ <odoo>
3
+ <record id="decimal_price" model="decimal.precision" forcecreate="True">
4
+ <field name="name">Manual Currency</field>
5
+ <field name="digits">12</field>
6
+ </record>
7
+ </odoo>
@@ -0,0 +1,123 @@
1
+ # Translation of Odoo Server.
2
+ # This file contains the translation of the following modules:
3
+ # * account_manual_currency
4
+ #
5
+ msgid ""
6
+ msgstr ""
7
+ "Project-Id-Version: Odoo Server 15.0\n"
8
+ "Report-Msgid-Bugs-To: \n"
9
+ "Last-Translator: \n"
10
+ "Language-Team: \n"
11
+ "MIME-Version: 1.0\n"
12
+ "Content-Type: text/plain; charset=UTF-8\n"
13
+ "Content-Transfer-Encoding: \n"
14
+ "Plural-Forms: \n"
15
+
16
+ #. module: account_manual_currency
17
+ #: code:addons/account_manual_currency/models/account_move.py:0
18
+ #, python-format
19
+ msgid "%(company_currency_name)s per 1 %(rate_currency_name)s"
20
+ msgstr ""
21
+
22
+ #. module: account_manual_currency
23
+ #: code:addons/account_manual_currency/models/account_move.py:0
24
+ #, python-format
25
+ msgid "%(rate_currency_name)s per 1 %(company_currency_name)s"
26
+ msgstr ""
27
+
28
+ #. module: account_manual_currency
29
+ #: model_terms:ir.ui.view,arch_db:account_manual_currency.view_move_form
30
+ msgid "<i title=\"Update Currency\" class=\"fa fa-fw fa-refresh\"/>"
31
+ msgstr ""
32
+
33
+ #. module: account_manual_currency
34
+ #: model:ir.model.fields,field_description:account_manual_currency.field_account_bank_statement_line__currency_diff
35
+ #: model:ir.model.fields,field_description:account_manual_currency.field_account_move__currency_diff
36
+ #: model:ir.model.fields,field_description:account_manual_currency.field_account_payment__currency_diff
37
+ msgid "Currency Diff"
38
+ msgstr ""
39
+
40
+ #. module: account_manual_currency
41
+ #: model:ir.model.fields,field_description:account_manual_currency.field_account_bank_statement_line__is_manual
42
+ #: model:ir.model.fields,field_description:account_manual_currency.field_account_move__is_manual
43
+ #: model:ir.model.fields,field_description:account_manual_currency.field_account_payment__is_manual
44
+ msgid "Is Manual"
45
+ msgstr ""
46
+
47
+ #. module: account_manual_currency
48
+ #: model:ir.model,name:account_manual_currency.model_account_move
49
+ msgid "Journal Entry"
50
+ msgstr ""
51
+
52
+ #. module: account_manual_currency
53
+ #: model:ir.model,name:account_manual_currency.model_account_move_line
54
+ msgid "Journal Item"
55
+ msgstr ""
56
+
57
+ #. module: account_manual_currency
58
+ #: model:ir.model.fields,field_description:account_manual_currency.field_account_bank_statement_line__manual_currency
59
+ #: model:ir.model.fields,field_description:account_manual_currency.field_account_move__manual_currency
60
+ #: model:ir.model.fields,field_description:account_manual_currency.field_account_payment__manual_currency
61
+ msgid "Manual Currency"
62
+ msgstr ""
63
+
64
+ #. module: account_manual_currency
65
+ #: model:ir.model.fields,field_description:account_manual_currency.field_account_bank_statement_line__manual_currency_rate
66
+ #: model:ir.model.fields,field_description:account_manual_currency.field_account_move__manual_currency_rate
67
+ #: model:ir.model.fields,field_description:account_manual_currency.field_account_payment__manual_currency_rate
68
+ msgid "Manual Currency Rate"
69
+ msgstr ""
70
+
71
+ #. module: account_manual_currency
72
+ #: model_terms:ir.ui.view,arch_db:account_manual_currency.view_move_form
73
+ msgid "Opened"
74
+ msgstr ""
75
+
76
+ #. module: account_manual_currency
77
+ #: code:addons/account_manual_currency/models/account_move.py:0
78
+ #, python-format
79
+ msgid "Rate currency can refresh state draft only."
80
+ msgstr ""
81
+
82
+ #. module: account_manual_currency
83
+ #: model:ir.model,name:account_manual_currency.model_account_payment_register
84
+ msgid "Register Payment"
85
+ msgstr ""
86
+
87
+ #. module: account_manual_currency
88
+ #: model:ir.model.fields,help:account_manual_currency.field_account_bank_statement_line__manual_currency_rate
89
+ #: model:ir.model.fields,help:account_manual_currency.field_account_move__manual_currency_rate
90
+ #: model:ir.model.fields,help:account_manual_currency.field_account_payment__manual_currency_rate
91
+ msgid ""
92
+ "Set new currency rate to apply on the invoice\n"
93
+ ".This rate will be taken in order to convert amounts between the currency on the purchase order and last currency"
94
+ msgstr ""
95
+
96
+ #. module: account_manual_currency
97
+ #: model:ir.model.fields,field_description:account_manual_currency.field_account_bank_statement_line__total_company_currency
98
+ #: model:ir.model.fields,field_description:account_manual_currency.field_account_move__total_company_currency
99
+ #: model:ir.model.fields,field_description:account_manual_currency.field_account_payment__total_company_currency
100
+ msgid "Total Company Currency"
101
+ msgstr ""
102
+
103
+ #. module: account_manual_currency
104
+ #: model:ir.model.fields,field_description:account_manual_currency.field_account_bank_statement_line__type_currency
105
+ #: model:ir.model.fields,field_description:account_manual_currency.field_account_move__type_currency
106
+ #: model:ir.model.fields,field_description:account_manual_currency.field_account_payment__type_currency
107
+ msgid "Type Currency"
108
+ msgstr ""
109
+
110
+ #. module: account_manual_currency
111
+ #: code:addons/account_manual_currency/wizard/account_payment_register.py:0
112
+ #, python-format
113
+ msgid ""
114
+ "You can only register payments for moves with the same manual currency."
115
+ msgstr ""
116
+
117
+ #. module: account_manual_currency
118
+ #: code:addons/account_manual_currency/wizard/account_payment_register.py:0
119
+ #, python-format
120
+ msgid ""
121
+ "You can't register a payment for invoices belong to multiple manual currency"
122
+ " rate."
123
+ msgstr ""
@@ -0,0 +1,3 @@
1
+ # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
2
+
3
+ from . import account_move
@@ -0,0 +1,186 @@
1
+ # Copyright 2023 Ecosoft Co., Ltd. (http://ecosoft.co.th)
2
+ # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
3
+
4
+ from lxml import etree
5
+
6
+ from odoo import _, api, fields, models
7
+ from odoo.exceptions import ValidationError
8
+
9
+
10
+ class AccountMove(models.Model):
11
+ _inherit = "account.move"
12
+
13
+ manual_currency = fields.Boolean(
14
+ readonly=True,
15
+ states={"draft": [("readonly", False)]},
16
+ )
17
+ is_manual = fields.Boolean(compute="_compute_currency")
18
+ type_currency = fields.Selection(
19
+ selection=lambda self: self._get_label_currency_name(),
20
+ default=lambda self: self._get_label_currency_name()[0][0],
21
+ readonly=True,
22
+ states={"draft": [("readonly", False)]},
23
+ )
24
+ manual_currency_rate = fields.Float(
25
+ digits="Manual Currency",
26
+ tracking=True,
27
+ readonly=True,
28
+ states={"draft": [("readonly", False)]},
29
+ help="Set new currency rate to apply on the invoice\n."
30
+ "This rate will be taken in order to convert amounts between the "
31
+ "currency on the purchase order and last currency",
32
+ )
33
+ total_company_currency = fields.Monetary(
34
+ compute="_compute_total_company_currency", currency_field="company_currency_id"
35
+ )
36
+ currency_diff = fields.Boolean(
37
+ compute="_compute_currency_diff",
38
+ store=True,
39
+ )
40
+
41
+ @api.depends("currency_id")
42
+ def _compute_currency_diff(self):
43
+ for rec in self:
44
+ rec.currency_diff = rec.company_currency_id != rec.currency_id
45
+
46
+ @api.depends("line_ids.balance")
47
+ def _compute_total_company_currency(self):
48
+ """Convert total currency to company currency"""
49
+ for rec in self:
50
+ # check manual currency
51
+ if rec.manual_currency:
52
+ rate = (
53
+ rec.manual_currency_rate
54
+ if rec.type_currency == "inverse_company_rate"
55
+ else (1.0 / rec.manual_currency_rate)
56
+ )
57
+ rec.total_company_currency = rec.amount_total * rate
58
+ # default rate currency
59
+ else:
60
+ rec.total_company_currency = rec.currency_id._convert(
61
+ rec.amount_total,
62
+ rec.company_currency_id,
63
+ rec.company_id,
64
+ fields.Date.today(),
65
+ )
66
+
67
+ def _get_label_currency_name(self):
68
+ """Get label related currency"""
69
+ names = {
70
+ "company_currency_name": (
71
+ self.env["res.company"].browse(self._context.get("company_id"))
72
+ or self.env.company
73
+ ).currency_id.name,
74
+ "rate_currency_name": "Currency",
75
+ }
76
+ return [
77
+ [
78
+ "company_rate",
79
+ _("%(rate_currency_name)s per 1 %(company_currency_name)s", **names),
80
+ ],
81
+ [
82
+ "inverse_company_rate",
83
+ _("%(company_currency_name)s per 1 %(rate_currency_name)s", **names),
84
+ ],
85
+ ]
86
+
87
+ @api.onchange("manual_currency", "type_currency", "currency_id", "date")
88
+ def _onchange_currency_change_rate(self):
89
+ today = fields.Date.today()
90
+ company_currency = self.env.company.currency_id
91
+ amount_currency = company_currency._get_conversion_rate(
92
+ company_currency,
93
+ self.currency_id,
94
+ self.company_id,
95
+ self.date or today,
96
+ )
97
+ if self.type_currency == "inverse_company_rate":
98
+ amount_currency = 1.0 / amount_currency
99
+ self.manual_currency_rate = amount_currency
100
+ self.line_ids._onchange_amount_currency()
101
+
102
+ @api.onchange("manual_currency_rate")
103
+ def _onchange_manual_currency_rate(self):
104
+ self.line_ids._onchange_amount_currency()
105
+
106
+ @api.depends("currency_id")
107
+ def _compute_currency(self):
108
+ for rec in self:
109
+ rec.is_manual = rec.currency_id != rec.company_id.currency_id
110
+
111
+ def action_refresh_currency(self):
112
+ self.ensure_one()
113
+ if self.state != "draft":
114
+ raise ValidationError(_("Rate currency can refresh state draft only."))
115
+ self.with_context(check_move_validity=False)._onchange_currency_change_rate()
116
+ return True
117
+
118
+ @api.model
119
+ def _fields_view_get(
120
+ self, view_id=None, view_type="form", toolbar=False, submenu=False
121
+ ):
122
+ """Change string name to company currency"""
123
+ result = super()._fields_view_get(
124
+ view_id=view_id, view_type=view_type, toolbar=toolbar, submenu=submenu
125
+ )
126
+ if view_type == "form":
127
+ company_currency_name = (
128
+ self.env["res.company"].browse(self._context.get("company_id"))
129
+ or self.env.company
130
+ ).currency_id.name
131
+ doc = etree.XML(result["arch"])
132
+ # Total company currency
133
+ node = doc.xpath("//field[@name='total_company_currency']")
134
+ if node:
135
+ node[0].set("string", "Total ({})".format(company_currency_name))
136
+ result["arch"] = etree.tostring(doc, encoding="unicode")
137
+ return result
138
+
139
+
140
+ class AccountMoveLine(models.Model):
141
+ _inherit = "account.move.line"
142
+
143
+ @api.onchange("amount_currency")
144
+ def _onchange_amount_currency(self):
145
+ for line in self:
146
+ if line.move_id.manual_currency:
147
+ rate = (
148
+ line.move_id.manual_currency_rate
149
+ if line.move_id.type_currency == "inverse_company_rate"
150
+ else (1.0 / line.move_id.manual_currency_rate)
151
+ )
152
+ balance = line.amount_currency * rate
153
+ line.debit = balance if balance > 0.0 else 0.0
154
+ line.credit = -balance if balance < 0.0 else 0.0
155
+
156
+ if not line.move_id.is_invoice(include_receipts=True):
157
+ continue
158
+
159
+ line.update(line._get_fields_onchange_balance())
160
+ line.update(line._get_price_total_and_subtotal())
161
+ else:
162
+ super(AccountMoveLine, line)._onchange_amount_currency()
163
+ return
164
+
165
+ @api.model
166
+ def _get_fields_onchange_subtotal_model(
167
+ self, price_subtotal, move_type, currency, company, date
168
+ ):
169
+ if self.move_id.manual_currency:
170
+ sign = -1 if move_type in self.move_id.get_inbound_types() else 1
171
+ amount_currency = price_subtotal * sign
172
+ rate = (
173
+ self.move_id.manual_currency_rate
174
+ if self.move_id.type_currency == "inverse_company_rate"
175
+ else (1.0 / self.move_id.manual_currency_rate)
176
+ )
177
+ balance = price_subtotal * rate
178
+ return {
179
+ "amount_currency": amount_currency,
180
+ "currency_id": currency.id,
181
+ "debit": balance > 0.0 and balance or 0.0,
182
+ "credit": balance < 0.0 and -balance or 0.0,
183
+ }
184
+ return super()._get_fields_onchange_subtotal_model(
185
+ price_subtotal, move_type, currency, company, date
186
+ )
@@ -0,0 +1 @@
1
+ * Saran Lim. <saranl@ecosoft.co.th>
@@ -0,0 +1,8 @@
1
+ This module allows users to update the currency manually for invoices that are still in the draft stage.
2
+ It offers flexibility to companies when calculating currency rates for invoicing.
3
+
4
+ For example, if a company makes a deal with a vendor but the actual purchase happens on a different day,
5
+ this module lets them choose whether to use the currency rate from the accounting date
6
+ or a special rate agreed upon during the deal.
7
+ This ensures accurate currency rate calculations for invoices,
8
+ even when the purchase date and deal date differ.
@@ -0,0 +1,8 @@
1
+ To use this module, the company must have access rights for multiple currencies.
2
+
3
+ Follow these steps to use manual currency:
4
+
5
+ #. Go to Invoicing > Create new invoice/bills.
6
+ #. If you need to change the currency to one other than the company's default currency, you will see an option for 'Manual Currency'.
7
+ #. Check the 'Manual Currency' box to enable manual currency entry.
8
+ #. Specify the desired currency rate for the selected currency.
@@ -0,0 +1,439 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
+ <head>
5
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6
+ <meta name="generator" content="Docutils: https://docutils.sourceforge.io/" />
7
+ <title>Account - Manual Currency</title>
8
+ <style type="text/css">
9
+
10
+ /*
11
+ :Author: David Goodger (goodger@python.org)
12
+ :Id: $Id: html4css1.css 8954 2022-01-20 10:10:25Z milde $
13
+ :Copyright: This stylesheet has been placed in the public domain.
14
+
15
+ Default cascading style sheet for the HTML output of Docutils.
16
+
17
+ See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to
18
+ customize this style sheet.
19
+ */
20
+
21
+ /* used to remove borders from tables and images */
22
+ .borderless, table.borderless td, table.borderless th {
23
+ border: 0 }
24
+
25
+ table.borderless td, table.borderless th {
26
+ /* Override padding for "table.docutils td" with "! important".
27
+ The right padding separates the table cells. */
28
+ padding: 0 0.5em 0 0 ! important }
29
+
30
+ .first {
31
+ /* Override more specific margin styles with "! important". */
32
+ margin-top: 0 ! important }
33
+
34
+ .last, .with-subtitle {
35
+ margin-bottom: 0 ! important }
36
+
37
+ .hidden {
38
+ display: none }
39
+
40
+ .subscript {
41
+ vertical-align: sub;
42
+ font-size: smaller }
43
+
44
+ .superscript {
45
+ vertical-align: super;
46
+ font-size: smaller }
47
+
48
+ a.toc-backref {
49
+ text-decoration: none ;
50
+ color: black }
51
+
52
+ blockquote.epigraph {
53
+ margin: 2em 5em ; }
54
+
55
+ dl.docutils dd {
56
+ margin-bottom: 0.5em }
57
+
58
+ object[type="image/svg+xml"], object[type="application/x-shockwave-flash"] {
59
+ overflow: hidden;
60
+ }
61
+
62
+ /* Uncomment (and remove this text!) to get bold-faced definition list terms
63
+ dl.docutils dt {
64
+ font-weight: bold }
65
+ */
66
+
67
+ div.abstract {
68
+ margin: 2em 5em }
69
+
70
+ div.abstract p.topic-title {
71
+ font-weight: bold ;
72
+ text-align: center }
73
+
74
+ div.admonition, div.attention, div.caution, div.danger, div.error,
75
+ div.hint, div.important, div.note, div.tip, div.warning {
76
+ margin: 2em ;
77
+ border: medium outset ;
78
+ padding: 1em }
79
+
80
+ div.admonition p.admonition-title, div.hint p.admonition-title,
81
+ div.important p.admonition-title, div.note p.admonition-title,
82
+ div.tip p.admonition-title {
83
+ font-weight: bold ;
84
+ font-family: sans-serif }
85
+
86
+ div.attention p.admonition-title, div.caution p.admonition-title,
87
+ div.danger p.admonition-title, div.error p.admonition-title,
88
+ div.warning p.admonition-title, .code .error {
89
+ color: red ;
90
+ font-weight: bold ;
91
+ font-family: sans-serif }
92
+
93
+ /* Uncomment (and remove this text!) to get reduced vertical space in
94
+ compound paragraphs.
95
+ div.compound .compound-first, div.compound .compound-middle {
96
+ margin-bottom: 0.5em }
97
+
98
+ div.compound .compound-last, div.compound .compound-middle {
99
+ margin-top: 0.5em }
100
+ */
101
+
102
+ div.dedication {
103
+ margin: 2em 5em ;
104
+ text-align: center ;
105
+ font-style: italic }
106
+
107
+ div.dedication p.topic-title {
108
+ font-weight: bold ;
109
+ font-style: normal }
110
+
111
+ div.figure {
112
+ margin-left: 2em ;
113
+ margin-right: 2em }
114
+
115
+ div.footer, div.header {
116
+ clear: both;
117
+ font-size: smaller }
118
+
119
+ div.line-block {
120
+ display: block ;
121
+ margin-top: 1em ;
122
+ margin-bottom: 1em }
123
+
124
+ div.line-block div.line-block {
125
+ margin-top: 0 ;
126
+ margin-bottom: 0 ;
127
+ margin-left: 1.5em }
128
+
129
+ div.sidebar {
130
+ margin: 0 0 0.5em 1em ;
131
+ border: medium outset ;
132
+ padding: 1em ;
133
+ background-color: #ffffee ;
134
+ width: 40% ;
135
+ float: right ;
136
+ clear: right }
137
+
138
+ div.sidebar p.rubric {
139
+ font-family: sans-serif ;
140
+ font-size: medium }
141
+
142
+ div.system-messages {
143
+ margin: 5em }
144
+
145
+ div.system-messages h1 {
146
+ color: red }
147
+
148
+ div.system-message {
149
+ border: medium outset ;
150
+ padding: 1em }
151
+
152
+ div.system-message p.system-message-title {
153
+ color: red ;
154
+ font-weight: bold }
155
+
156
+ div.topic {
157
+ margin: 2em }
158
+
159
+ h1.section-subtitle, h2.section-subtitle, h3.section-subtitle,
160
+ h4.section-subtitle, h5.section-subtitle, h6.section-subtitle {
161
+ margin-top: 0.4em }
162
+
163
+ h1.title {
164
+ text-align: center }
165
+
166
+ h2.subtitle {
167
+ text-align: center }
168
+
169
+ hr.docutils {
170
+ width: 75% }
171
+
172
+ img.align-left, .figure.align-left, object.align-left, table.align-left {
173
+ clear: left ;
174
+ float: left ;
175
+ margin-right: 1em }
176
+
177
+ img.align-right, .figure.align-right, object.align-right, table.align-right {
178
+ clear: right ;
179
+ float: right ;
180
+ margin-left: 1em }
181
+
182
+ img.align-center, .figure.align-center, object.align-center {
183
+ display: block;
184
+ margin-left: auto;
185
+ margin-right: auto;
186
+ }
187
+
188
+ table.align-center {
189
+ margin-left: auto;
190
+ margin-right: auto;
191
+ }
192
+
193
+ .align-left {
194
+ text-align: left }
195
+
196
+ .align-center {
197
+ clear: both ;
198
+ text-align: center }
199
+
200
+ .align-right {
201
+ text-align: right }
202
+
203
+ /* reset inner alignment in figures */
204
+ div.align-right {
205
+ text-align: inherit }
206
+
207
+ /* div.align-center * { */
208
+ /* text-align: left } */
209
+
210
+ .align-top {
211
+ vertical-align: top }
212
+
213
+ .align-middle {
214
+ vertical-align: middle }
215
+
216
+ .align-bottom {
217
+ vertical-align: bottom }
218
+
219
+ ol.simple, ul.simple {
220
+ margin-bottom: 1em }
221
+
222
+ ol.arabic {
223
+ list-style: decimal }
224
+
225
+ ol.loweralpha {
226
+ list-style: lower-alpha }
227
+
228
+ ol.upperalpha {
229
+ list-style: upper-alpha }
230
+
231
+ ol.lowerroman {
232
+ list-style: lower-roman }
233
+
234
+ ol.upperroman {
235
+ list-style: upper-roman }
236
+
237
+ p.attribution {
238
+ text-align: right ;
239
+ margin-left: 50% }
240
+
241
+ p.caption {
242
+ font-style: italic }
243
+
244
+ p.credits {
245
+ font-style: italic ;
246
+ font-size: smaller }
247
+
248
+ p.label {
249
+ white-space: nowrap }
250
+
251
+ p.rubric {
252
+ font-weight: bold ;
253
+ font-size: larger ;
254
+ color: maroon ;
255
+ text-align: center }
256
+
257
+ p.sidebar-title {
258
+ font-family: sans-serif ;
259
+ font-weight: bold ;
260
+ font-size: larger }
261
+
262
+ p.sidebar-subtitle {
263
+ font-family: sans-serif ;
264
+ font-weight: bold }
265
+
266
+ p.topic-title {
267
+ font-weight: bold }
268
+
269
+ pre.address {
270
+ margin-bottom: 0 ;
271
+ margin-top: 0 ;
272
+ font: inherit }
273
+
274
+ pre.literal-block, pre.doctest-block, pre.math, pre.code {
275
+ margin-left: 2em ;
276
+ margin-right: 2em }
277
+
278
+ pre.code .ln { color: grey; } /* line numbers */
279
+ pre.code, code { background-color: #eeeeee }
280
+ pre.code .comment, code .comment { color: #5C6576 }
281
+ pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
282
+ pre.code .literal.string, code .literal.string { color: #0C5404 }
283
+ pre.code .name.builtin, code .name.builtin { color: #352B84 }
284
+ pre.code .deleted, code .deleted { background-color: #DEB0A1}
285
+ pre.code .inserted, code .inserted { background-color: #A3D289}
286
+
287
+ span.classifier {
288
+ font-family: sans-serif ;
289
+ font-style: oblique }
290
+
291
+ span.classifier-delimiter {
292
+ font-family: sans-serif ;
293
+ font-weight: bold }
294
+
295
+ span.interpreted {
296
+ font-family: sans-serif }
297
+
298
+ span.option {
299
+ white-space: nowrap }
300
+
301
+ span.pre {
302
+ white-space: pre }
303
+
304
+ span.problematic {
305
+ color: red }
306
+
307
+ span.section-subtitle {
308
+ /* font-size relative to parent (h1..h6 element) */
309
+ font-size: 80% }
310
+
311
+ table.citation {
312
+ border-left: solid 1px gray;
313
+ margin-left: 1px }
314
+
315
+ table.docinfo {
316
+ margin: 2em 4em }
317
+
318
+ table.docutils {
319
+ margin-top: 0.5em ;
320
+ margin-bottom: 0.5em }
321
+
322
+ table.footnote {
323
+ border-left: solid 1px black;
324
+ margin-left: 1px }
325
+
326
+ table.docutils td, table.docutils th,
327
+ table.docinfo td, table.docinfo th {
328
+ padding-left: 0.5em ;
329
+ padding-right: 0.5em ;
330
+ vertical-align: top }
331
+
332
+ table.docutils th.field-name, table.docinfo th.docinfo-name {
333
+ font-weight: bold ;
334
+ text-align: left ;
335
+ white-space: nowrap ;
336
+ padding-left: 0 }
337
+
338
+ /* "booktabs" style (no vertical lines) */
339
+ table.docutils.booktabs {
340
+ border: 0px;
341
+ border-top: 2px solid;
342
+ border-bottom: 2px solid;
343
+ border-collapse: collapse;
344
+ }
345
+ table.docutils.booktabs * {
346
+ border: 0px;
347
+ }
348
+ table.docutils.booktabs th {
349
+ border-bottom: thin solid;
350
+ text-align: left;
351
+ }
352
+
353
+ h1 tt.docutils, h2 tt.docutils, h3 tt.docutils,
354
+ h4 tt.docutils, h5 tt.docutils, h6 tt.docutils {
355
+ font-size: 100% }
356
+
357
+ ul.auto-toc {
358
+ list-style-type: none }
359
+
360
+ </style>
361
+ </head>
362
+ <body>
363
+ <div class="document" id="account-manual-currency">
364
+ <h1 class="title">Account - Manual Currency</h1>
365
+
366
+ <!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
367
+ !! This file is generated by oca-gen-addon-readme !!
368
+ !! changes will be overwritten. !!
369
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
370
+ !! source digest: sha256:35466de2e1eddf226817cd39139b497344396512b366f5bd4be981453e5b8721
371
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
372
+ <p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/account-invoicing/tree/15.0/account_manual_currency"><img alt="OCA/account-invoicing" src="https://img.shields.io/badge/github-OCA%2Faccount--invoicing-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/account-invoicing-15-0/account-invoicing-15-0-account_manual_currency"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/account-invoicing&amp;target_branch=15.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
373
+ <p>This module allows users to update the currency manually for invoices that are still in the draft stage.
374
+ It offers flexibility to companies when calculating currency rates for invoicing.</p>
375
+ <p>For example, if a company makes a deal with a vendor but the actual purchase happens on a different day,
376
+ this module lets them choose whether to use the currency rate from the accounting date
377
+ or a special rate agreed upon during the deal.
378
+ This ensures accurate currency rate calculations for invoices,
379
+ even when the purchase date and deal date differ.</p>
380
+ <p><strong>Table of contents</strong></p>
381
+ <div class="contents local topic" id="contents">
382
+ <ul class="simple">
383
+ <li><a class="reference internal" href="#usage" id="toc-entry-1">Usage</a></li>
384
+ <li><a class="reference internal" href="#bug-tracker" id="toc-entry-2">Bug Tracker</a></li>
385
+ <li><a class="reference internal" href="#credits" id="toc-entry-3">Credits</a><ul>
386
+ <li><a class="reference internal" href="#authors" id="toc-entry-4">Authors</a></li>
387
+ <li><a class="reference internal" href="#contributors" id="toc-entry-5">Contributors</a></li>
388
+ <li><a class="reference internal" href="#maintainers" id="toc-entry-6">Maintainers</a></li>
389
+ </ul>
390
+ </li>
391
+ </ul>
392
+ </div>
393
+ <div class="section" id="usage">
394
+ <h1><a class="toc-backref" href="#toc-entry-1">Usage</a></h1>
395
+ <p>To use this module, the company must have access rights for multiple currencies.</p>
396
+ <p>Follow these steps to use manual currency:</p>
397
+ <ol class="arabic simple">
398
+ <li>Go to Invoicing &gt; Create new invoice/bills.</li>
399
+ <li>If you need to change the currency to one other than the company’s default currency, you will see an option for ‘Manual Currency’.</li>
400
+ <li>Check the ‘Manual Currency’ box to enable manual currency entry.</li>
401
+ <li>Specify the desired currency rate for the selected currency.</li>
402
+ </ol>
403
+ </div>
404
+ <div class="section" id="bug-tracker">
405
+ <h1><a class="toc-backref" href="#toc-entry-2">Bug Tracker</a></h1>
406
+ <p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/account-invoicing/issues">GitHub Issues</a>.
407
+ In case of trouble, please check there if your issue has already been reported.
408
+ If you spotted it first, help us to smash it by providing a detailed and welcomed
409
+ <a class="reference external" href="https://github.com/OCA/account-invoicing/issues/new?body=module:%20account_manual_currency%0Aversion:%2015.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
410
+ <p>Do not contact contributors directly about support or help with technical issues.</p>
411
+ </div>
412
+ <div class="section" id="credits">
413
+ <h1><a class="toc-backref" href="#toc-entry-3">Credits</a></h1>
414
+ <div class="section" id="authors">
415
+ <h2><a class="toc-backref" href="#toc-entry-4">Authors</a></h2>
416
+ <ul class="simple">
417
+ <li>Ecosoft</li>
418
+ </ul>
419
+ </div>
420
+ <div class="section" id="contributors">
421
+ <h2><a class="toc-backref" href="#toc-entry-5">Contributors</a></h2>
422
+ <ul class="simple">
423
+ <li>Saran Lim. &lt;<a class="reference external" href="mailto:saranl&#64;ecosoft.co.th">saranl&#64;ecosoft.co.th</a>&gt;</li>
424
+ </ul>
425
+ </div>
426
+ <div class="section" id="maintainers">
427
+ <h2><a class="toc-backref" href="#toc-entry-6">Maintainers</a></h2>
428
+ <p>This module is maintained by the OCA.</p>
429
+ <a class="reference external image-reference" href="https://odoo-community.org"><img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" /></a>
430
+ <p>OCA, or the Odoo Community Association, is a nonprofit organization whose
431
+ mission is to support the collaborative development of Odoo features and
432
+ promote its widespread use.</p>
433
+ <p>This module is part of the <a class="reference external" href="https://github.com/OCA/account-invoicing/tree/15.0/account_manual_currency">OCA/account-invoicing</a> project on GitHub.</p>
434
+ <p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
435
+ </div>
436
+ </div>
437
+ </div>
438
+ </body>
439
+ </html>
@@ -0,0 +1,3 @@
1
+ # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html)
2
+
3
+ from . import test_account_manual_currency
@@ -0,0 +1,131 @@
1
+ # Copyright 2023 Ecosoft Co., Ltd. (http://ecosoft.co.th)
2
+ # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
3
+
4
+ from odoo import Command, fields
5
+ from odoo.exceptions import UserError, ValidationError
6
+ from odoo.tests.common import Form, TransactionCase
7
+
8
+
9
+ class TestAccountManualCurrency(TransactionCase):
10
+ @classmethod
11
+ def setUpClass(cls):
12
+ super().setUpClass()
13
+ cls.inv_model = cls.env["account.move"]
14
+ cls.payment_model = cls.env["account.payment"]
15
+ cls.payment_register_model = cls.env["account.payment.register"]
16
+ cls.register_view_id = "account.view_account_payment_register_form"
17
+ # Activate Multi Currency
18
+ cls.usd_currency = cls.env.ref("base.USD")
19
+ cls.eur_currency = cls.env.ref("base.EUR")
20
+ cls.eur_currency.active = True
21
+
22
+ cls.partner1 = cls.env.ref("base.res_partner_3")
23
+
24
+ cls.cash = cls.env["account.journal"].create(
25
+ {"name": "Cash Test", "type": "cash", "code": "CT"}
26
+ )
27
+
28
+ def _create_invoice(
29
+ self,
30
+ partner,
31
+ invoice_type,
32
+ currency,
33
+ manual_currency=False,
34
+ manual_currency_rate=0.0,
35
+ type_currency="company_rate",
36
+ ):
37
+ inv_line = [
38
+ Command.create(
39
+ {
40
+ "product_id": self.env.ref("product.product_product_8").id,
41
+ "name": "Test Invoice Line",
42
+ "quantity": 1.0,
43
+ "price_unit": 100.0,
44
+ },
45
+ )
46
+ ]
47
+ invoice = self.inv_model.create(
48
+ {
49
+ "partner_id": partner.id,
50
+ "invoice_date": fields.Date.today(),
51
+ "move_type": invoice_type,
52
+ "currency_id": currency.id,
53
+ "manual_currency": manual_currency,
54
+ "type_currency": type_currency,
55
+ "manual_currency_rate": manual_currency_rate,
56
+ "invoice_line_ids": inv_line,
57
+ }
58
+ )
59
+ return invoice
60
+
61
+ def test_01_account_move_inverse_currency(self):
62
+ # Create invoice with custom rate: 10 USD = 1 EUR
63
+ invoice1 = self._create_invoice(
64
+ self.partner1,
65
+ "in_invoice",
66
+ self.eur_currency,
67
+ True,
68
+ 10,
69
+ "inverse_company_rate",
70
+ )
71
+ invoice1._fields_view_get()
72
+ self.assertTrue(invoice1.is_manual)
73
+ # Currency will recompute to default
74
+ self.assertEqual(invoice1.manual_currency_rate, 10)
75
+ invoice1.action_refresh_currency()
76
+ self.assertNotEqual(invoice1.manual_currency_rate, 10)
77
+ total_currency_not_manual = invoice1.total_company_currency
78
+ self.assertAlmostEqual(
79
+ total_currency_not_manual,
80
+ sum(invoice1.line_ids.filtered(lambda l: l.product_id).mapped("balance")),
81
+ )
82
+ # Use manual currency
83
+ with Form(invoice1) as inv:
84
+ inv.manual_currency = True
85
+ inv.type_currency = "inverse_company_rate"
86
+ inv.manual_currency_rate = 20 # Convert rate: 20 USD = 1 EUR
87
+ inv.save()
88
+ # After manual currency, total currency will recompute
89
+ self.assertNotEqual(invoice1.total_company_currency, total_currency_not_manual)
90
+ self.assertAlmostEqual(
91
+ invoice1.total_company_currency,
92
+ sum(invoice1.line_ids.filtered(lambda l: l.product_id).mapped("balance")),
93
+ )
94
+ invoice1.action_post()
95
+ self.assertEqual(invoice1.state, "posted")
96
+ # Can't refresh rate when state is not draft
97
+ with self.assertRaises(ValidationError):
98
+ invoice1.action_refresh_currency()
99
+
100
+ # Create invoice
101
+ invoice2 = self._create_invoice(self.partner1, "in_invoice", self.usd_currency)
102
+ invoice2.action_post()
103
+ self.assertEqual(invoice2.state, "posted")
104
+
105
+ # Register Payment
106
+ # Can't register payment with not same manual currency
107
+ ctx = {
108
+ "active_ids": (invoice1 + invoice2).mapped("line_ids").ids,
109
+ "active_model": "account.move.line",
110
+ }
111
+ with self.assertRaises(UserError):
112
+ Form(
113
+ self.payment_register_model.with_context(**ctx),
114
+ view=self.register_view_id,
115
+ ).save()
116
+ ctx = {
117
+ "active_ids": [invoice1.id],
118
+ "active_model": "account.move",
119
+ }
120
+ with Form(
121
+ self.payment_register_model.with_context(**ctx),
122
+ view=self.register_view_id,
123
+ ) as f:
124
+ f.amount = invoice1.amount_total
125
+ wiz = f.save()
126
+ action_payment = wiz.action_create_payments()
127
+ # Check move in payment must equal invoice
128
+ payment = self.payment_model.browse(action_payment["res_id"])
129
+ self.assertAlmostEqual(
130
+ payment.move_id.total_company_currency, invoice1.total_company_currency
131
+ )
@@ -0,0 +1,55 @@
1
+ <?xml version="1.0" encoding="utf-8" ?>
2
+ <odoo>
3
+ <record id="view_move_form" model="ir.ui.view">
4
+ <field name="name">account.move.form</field>
5
+ <field name="model">account.move</field>
6
+ <field name="inherit_id" ref="account.view_move_form" />
7
+ <field name="arch" type="xml">
8
+ <xpath
9
+ expr="//group[@id='header_right_group']/field[@name='currency_id']"
10
+ position="after"
11
+ >
12
+ <field name="is_manual" invisible="1" />
13
+ <label
14
+ for="manual_currency"
15
+ groups="base.group_multi_currency"
16
+ attrs="{'invisible': [('is_manual', '=', False)]}"
17
+ />
18
+ <div
19
+ groups="base.group_multi_currency"
20
+ attrs="{'invisible': [('is_manual', '=', False)]}"
21
+ >
22
+ <field name="manual_currency" />
23
+ <label for="manual_currency_rate" invisible='1' />
24
+ <div
25
+ class="o_row"
26
+ attrs="{'invisible': [('manual_currency', '=', False)]}"
27
+ >
28
+ <field name="manual_currency_rate" />
29
+ <field
30
+ name="type_currency"
31
+ attrs="{'required': [('manual_currency', '=', True)]}"
32
+ />
33
+ <button
34
+ aria-label="Opened"
35
+ type="object"
36
+ name="action_refresh_currency"
37
+ class="btn-link"
38
+ states="draft"
39
+ >
40
+ <i title="Update Currency" class="fa fa-fw fa-refresh" />
41
+ </button>
42
+ </div>
43
+ </div>
44
+ </xpath>
45
+ <xpath expr="//field[@name='tax_totals_json']" position="before">
46
+ <field
47
+ name="total_company_currency"
48
+ attrs="{'invisible': [('currency_diff', '=', False)]}"
49
+ />
50
+ <field name="company_currency_id" invisible="1" />
51
+ <field name="currency_diff" invisible="1" />
52
+ </xpath>
53
+ </field>
54
+ </record>
55
+ </odoo>
@@ -0,0 +1,3 @@
1
+ # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
2
+
3
+ from . import account_payment_register
@@ -0,0 +1,61 @@
1
+ # Copyright 2023 Ecosoft Co., Ltd. (http://ecosoft.co.th)
2
+ # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
3
+
4
+ from odoo import _, api, models
5
+ from odoo.exceptions import UserError
6
+
7
+
8
+ class AccountPaymentRegister(models.TransientModel):
9
+ _inherit = "account.payment.register"
10
+
11
+ @api.model
12
+ def default_get(self, fields_list):
13
+ res = super().default_get(fields_list)
14
+ if self._context.get("active_model") == "account.move":
15
+ moves = self.env["account.move"].browse(self._context.get("active_ids", []))
16
+ elif self._context.get("active_model") == "account.move.line":
17
+ moves = (
18
+ self.env["account.move.line"]
19
+ .browse(self._context.get("active_ids", []))
20
+ .mapped("move_id")
21
+ )
22
+ # Check manual currency
23
+ if len(set(moves.mapped("manual_currency"))) != 1:
24
+ raise UserError(
25
+ _(
26
+ "You can only register payments for moves with the same manual currency."
27
+ )
28
+ )
29
+ return res
30
+
31
+ def _init_payments(self, to_process, edit_mode=False):
32
+ payments = super()._init_payments(to_process, edit_mode)
33
+ if self._context.get("active_model") == "account.move":
34
+ for vals in to_process:
35
+ lines = vals["to_reconcile"]
36
+ payment = vals["payment"]
37
+ origin_move = lines.mapped("move_id")
38
+ # Not allow group payments for case manual currency
39
+ if (
40
+ self.group_payment
41
+ and len(origin_move) != 1
42
+ and len({move.manual_currency_rate for move in origin_move}) != 1
43
+ ):
44
+ raise UserError(
45
+ _(
46
+ "You can't register a payment for invoices "
47
+ "belong to multiple manual currency rate."
48
+ )
49
+ )
50
+ if all(move.manual_currency for move in origin_move):
51
+ payment.move_id.write(
52
+ {
53
+ "manual_currency": origin_move[0].manual_currency,
54
+ "type_currency": origin_move[0].type_currency,
55
+ "manual_currency_rate": origin_move[0].manual_currency_rate,
56
+ }
57
+ )
58
+ payment.move_id.with_context(
59
+ check_move_validity=False
60
+ ).line_ids._onchange_amount_currency()
61
+ return payments
@@ -0,0 +1,113 @@
1
+ Metadata-Version: 2.1
2
+ Name: odoo-addon-account-manual-currency
3
+ Version: 15.0.1.0.0.1
4
+ Summary: Allows to manual currency of Accounting
5
+ Home-page: https://github.com/OCA/account-invoicing
6
+ Author: Ecosoft, Odoo Community Association (OCA)
7
+ Author-email: support@odoo-community.org
8
+ License: AGPL-3
9
+ Platform: UNKNOWN
10
+ Classifier: Programming Language :: Python
11
+ Classifier: Framework :: Odoo
12
+ Classifier: Framework :: Odoo :: 15.0
13
+ Classifier: License :: OSI Approved :: GNU Affero General Public License v3
14
+ Requires-Python: >=3.8
15
+ Requires-Dist: odoo <15.1dev,>=15.0a
16
+
17
+ =========================
18
+ Account - Manual Currency
19
+ =========================
20
+
21
+ ..
22
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
23
+ !! This file is generated by oca-gen-addon-readme !!
24
+ !! changes will be overwritten. !!
25
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
26
+ !! source digest: sha256:35466de2e1eddf226817cd39139b497344396512b366f5bd4be981453e5b8721
27
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
28
+
29
+ .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
30
+ :target: https://odoo-community.org/page/development-status
31
+ :alt: Beta
32
+ .. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
33
+ :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
34
+ :alt: License: AGPL-3
35
+ .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Faccount--invoicing-lightgray.png?logo=github
36
+ :target: https://github.com/OCA/account-invoicing/tree/15.0/account_manual_currency
37
+ :alt: OCA/account-invoicing
38
+ .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
39
+ :target: https://translation.odoo-community.org/projects/account-invoicing-15-0/account-invoicing-15-0-account_manual_currency
40
+ :alt: Translate me on Weblate
41
+ .. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
42
+ :target: https://runboat.odoo-community.org/builds?repo=OCA/account-invoicing&target_branch=15.0
43
+ :alt: Try me on Runboat
44
+
45
+ |badge1| |badge2| |badge3| |badge4| |badge5|
46
+
47
+ This module allows users to update the currency manually for invoices that are still in the draft stage.
48
+ It offers flexibility to companies when calculating currency rates for invoicing.
49
+
50
+ For example, if a company makes a deal with a vendor but the actual purchase happens on a different day,
51
+ this module lets them choose whether to use the currency rate from the accounting date
52
+ or a special rate agreed upon during the deal.
53
+ This ensures accurate currency rate calculations for invoices,
54
+ even when the purchase date and deal date differ.
55
+
56
+ **Table of contents**
57
+
58
+ .. contents::
59
+ :local:
60
+
61
+ Usage
62
+ =====
63
+
64
+ To use this module, the company must have access rights for multiple currencies.
65
+
66
+ Follow these steps to use manual currency:
67
+
68
+ #. Go to Invoicing > Create new invoice/bills.
69
+ #. If you need to change the currency to one other than the company's default currency, you will see an option for 'Manual Currency'.
70
+ #. Check the 'Manual Currency' box to enable manual currency entry.
71
+ #. Specify the desired currency rate for the selected currency.
72
+
73
+ Bug Tracker
74
+ ===========
75
+
76
+ Bugs are tracked on `GitHub Issues <https://github.com/OCA/account-invoicing/issues>`_.
77
+ In case of trouble, please check there if your issue has already been reported.
78
+ If you spotted it first, help us to smash it by providing a detailed and welcomed
79
+ `feedback <https://github.com/OCA/account-invoicing/issues/new?body=module:%20account_manual_currency%0Aversion:%2015.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
80
+
81
+ Do not contact contributors directly about support or help with technical issues.
82
+
83
+ Credits
84
+ =======
85
+
86
+ Authors
87
+ ~~~~~~~
88
+
89
+ * Ecosoft
90
+
91
+ Contributors
92
+ ~~~~~~~~~~~~
93
+
94
+ * Saran Lim. <saranl@ecosoft.co.th>
95
+
96
+ Maintainers
97
+ ~~~~~~~~~~~
98
+
99
+ This module is maintained by the OCA.
100
+
101
+ .. image:: https://odoo-community.org/logo.png
102
+ :alt: Odoo Community Association
103
+ :target: https://odoo-community.org
104
+
105
+ OCA, or the Odoo Community Association, is a nonprofit organization whose
106
+ mission is to support the collaborative development of Odoo features and
107
+ promote its widespread use.
108
+
109
+ This module is part of the `OCA/account-invoicing <https://github.com/OCA/account-invoicing/tree/15.0/account_manual_currency>`_ project on GitHub.
110
+
111
+ You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
112
+
113
+
@@ -0,0 +1,21 @@
1
+ odoo/addons/account_manual_currency/README.rst,sha256=2kcjrMpqAN5ULCFSTCfV2f9-_5h-qSU-8j5dtq9ytFE,3851
2
+ odoo/addons/account_manual_currency/__init__.py,sha256=JqDSCLCkAweuTaARbhG1B8Lkrgg-ZjR4Jbkty4ySwok,107
3
+ odoo/addons/account_manual_currency/__manifest__.py,sha256=RCx06HbvjPjh3nhQrcLxoBiw-8EUOmTXOnhUtoftUPo,599
4
+ odoo/addons/account_manual_currency/data/decimal_data.xml,sha256=c0ildABsnBwK-FZrNh6E5xjq60P_j-uJroW0etOUZiI,237
5
+ odoo/addons/account_manual_currency/i18n/account_manual_currency.pot,sha256=cUPNTeRY5ZFKErY7O-xJ4vUA5xVjKW2xhDnhqdVxyLc,5044
6
+ odoo/addons/account_manual_currency/models/__init__.py,sha256=DDTUFzZK7UwvSce9ys3hcQGqLLt7A8PB30vXPNb2hC4,98
7
+ odoo/addons/account_manual_currency/models/account_move.py,sha256=pOhsGNa5e80d5Ls4W2K10qgNYRMyMqOT4PQ1LzdB36M,7044
8
+ odoo/addons/account_manual_currency/readme/CONTRIBUTORS.rst,sha256=G2zA5tOfZDES60Fif1REl-3h5-9Y50hpnn0uRFW-cMY,36
9
+ odoo/addons/account_manual_currency/readme/DESCRIPTION.rst,sha256=B-4TgHxo89sNkfoRPgZj-VPPHf57l5gOmhwXjLR7t7s,540
10
+ odoo/addons/account_manual_currency/readme/USAGE.rst,sha256=5bAWgCkefJmnzn6UoUviUYBw87V854cJ4Skq2_xDGZs,439
11
+ odoo/addons/account_manual_currency/static/description/icon.png,sha256=6xBPJauaFOF0KDHfHgQopSc28kKvxMaeoQFQWZtfZDo,9455
12
+ odoo/addons/account_manual_currency/static/description/index.html,sha256=_wI6MiYyRodxAtIAnZN17844e9U89_DeC7qyElmlIz8,13371
13
+ odoo/addons/account_manual_currency/tests/__init__.py,sha256=qmuaXxA67CBSi366aGt2_-EaRyDS0zFevkzmv5PNZuQ,113
14
+ odoo/addons/account_manual_currency/tests/test_account_manual_currency.py,sha256=9_PCa1OcbX_N1L9RST024AQn9I0cj0fbQ7dr-_qdSY0,4916
15
+ odoo/addons/account_manual_currency/views/account_move_view.xml,sha256=Gsvo5-MzV6FHf5cdJbY4L5R86V-uK_LPkTy_BQEeIBA,2348
16
+ odoo/addons/account_manual_currency/wizard/__init__.py,sha256=XZN8liC9Uvuso6ahx_bPzHFlCB7raBoWsg9NTQSpx_Y,104
17
+ odoo/addons/account_manual_currency/wizard/account_payment_register.py,sha256=b2A3MFFKCRc0xykwz4Dp4BKkrXVD4qD03ztaL78kq6M,2593
18
+ odoo_addon_account_manual_currency-15.0.1.0.0.1.dist-info/METADATA,sha256=CyoqOGl32T7oxu1OADnOmrHfwZTT4UKogqCT59nW6Ig,4412
19
+ odoo_addon_account_manual_currency-15.0.1.0.0.1.dist-info/WHEEL,sha256=Xo9-1PvkuimrydujYJAjF7pCkriuXBpUPEjma1nZyJ0,92
20
+ odoo_addon_account_manual_currency-15.0.1.0.0.1.dist-info/top_level.txt,sha256=qBj40grFkGOfDZ2WDSw3y1RnDlgG0u8rP8pvGNdbz4w,5
21
+ odoo_addon_account_manual_currency-15.0.1.0.0.1.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: bdist_wheel (0.41.3)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+