Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
5865087
[UPD] Update account_invoice_margin_sale.pot
oca-travis Oct 14, 2020
fde1611
Added translation using Weblate (Spanish)
HaraldPanten Dec 16, 2020
873aca6
Translated using Weblate (Spanish)
HaraldPanten Dec 16, 2020
52c98be
[IMP] skip margin calculation for Down Payment invoice
Feb 1, 2021
7683e4a
[14.0][MIG] account_invoice_margin_sale: Migration to 14.0
Reyes4711-S73 May 3, 2021
da14bb2
Translated using Weblate (Spanish)
rafamarpe Feb 27, 2022
fc18e35
[MIG] account_invoice_margin_sale: Migration to 15.0
victoralmau Jul 28, 2022
d49ed1e
[MIG] account_invoice_margin_sale: Migration to 16.0
ljsalvatierra-factorlibre May 22, 2023
78e85c9
[MIG] account_invoice_margin_sale: Migration to 16.0
ljsalvatierra-factorlibre Jun 5, 2023
57cccd2
[UPD] Update account_invoice_margin_sale.pot
Jun 5, 2023
ba2ee27
Added translation using Weblate (French (France) (fr_FR))
sanrav Jun 5, 2023
558c4bd
Translated using Weblate (French (France) (fr_FR))
sanrav Jun 5, 2023
70c7fb7
Translated using Weblate (Spanish)
Gelo-fl Jun 7, 2023
35c2914
[IMP] account_invoice_margin_sale: test performance improvement
josep-tecnativa Oct 20, 2023
6777ee6
[FIX] account_invoice_margin_sale: error creating invoice from sale o…
dreispt Jan 8, 2024
7efc12c
Added translation using Weblate (Italian)
mymage Jan 22, 2024
cbea55a
Translated using Weblate (Italian)
mymage Jan 29, 2024
1f38e64
[IMP] account_invoice_margin_sale: pre-commit auto fixes
Feb 19, 2024
7fa4528
[MIG] account_invoice_margin_sale: Migration to 17.0
Feb 19, 2024
73ff048
[MIG] account_invoice_margin_sale: Migration to 18.0
BhaveshHeliconia Feb 14, 2025
0592f4f
[UPD] Update account_invoice_margin_sale.pot
Apr 22, 2025
946541a
[BOT] post-merge updates
OCA-git-bot Apr 22, 2025
25bfe90
[MIG] account_invoice_margin_sale: Migration to 19.0
Debora7 Jan 8, 2026
c230d6b
Pre-commit fixes.
Debora7 Jan 8, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
[MIG] account_invoice_margin_sale: Migration to 18.0
  • Loading branch information
BhaveshHeliconia authored and Debora7 committed Jan 8, 2026
commit 73ff0486efb72fa2f0a98de2ab8fb65d6f296275
32 changes: 16 additions & 16 deletions account_invoice_margin_sale/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ Account Invoice Margin Sale
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fmargin--analysis-lightgray.png?logo=github
:target: https://github.com/OCA/margin-analysis/tree/17.0/account_invoice_margin_sale
:target: https://github.com/OCA/margin-analysis/tree/18.0/account_invoice_margin_sale
:alt: OCA/margin-analysis
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/margin-analysis-17-0/margin-analysis-17-0-account_invoice_margin_sale
:target: https://translation.odoo-community.org/projects/margin-analysis-18-0/margin-analysis-18-0-account_invoice_margin_sale
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/margin-analysis&target_branch=17.0
:target: https://runboat.odoo-community.org/builds?repo=OCA/margin-analysis&target_branch=18.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|
Expand Down Expand Up @@ -56,7 +56,7 @@ Bug Tracker
Bugs are tracked on `GitHub Issues <https://github.com/OCA/margin-analysis/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/margin-analysis/issues/new?body=module:%20account_invoice_margin_sale%0Aversion:%2017.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
`feedback <https://github.com/OCA/margin-analysis/issues/new?body=module:%20account_invoice_margin_sale%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Do not contact contributors directly about support or help with technical issues.

Expand All @@ -71,24 +71,24 @@ Authors
Contributors
------------

- `Tecnativa <https://www.tecnativa.com>`__:
- `Tecnativa <https://www.tecnativa.com>`__:

- Sergio Teruel
- Carlos Dauden
- Víctor Martínez
- Sergio Teruel
- Carlos Dauden
- Víctor Martínez

- `Open Source Integrators <https://www.opensourceintegrators.com>`__:
- `Open Source Integrators <https://www.opensourceintegrators.com>`__:

- Bhavesh Odedra
- Daniel Reis <dreis@opensourceintegrators.com>
- Bhavesh Odedra
- Daniel Reis <dreis@opensourceintegrators.com>

- `Factor Libre <https://www.factorlibre.com>`__:
- `Factor Libre <https://www.factorlibre.com>`__:

- Luis J. Salvatierra
- Luis J. Salvatierra

- `Avoin.Systems <https://avoin.systems/>`__:
- `Avoin.Systems <https://avoin.systems/>`__:

- Nedas Żilinskas
- Nedas Żilinskas

Maintainers
-----------
Expand All @@ -114,6 +114,6 @@ Current `maintainers <https://odoo-community.org/page/maintainer-role>`__:

|maintainer-sergio-teruel| |maintainer-carlosdauden|

This module is part of the `OCA/margin-analysis <https://github.com/OCA/margin-analysis/tree/17.0/account_invoice_margin_sale>`_ project on GitHub.
This module is part of the `OCA/margin-analysis <https://github.com/OCA/margin-analysis/tree/18.0/account_invoice_margin_sale>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
2 changes: 1 addition & 1 deletion account_invoice_margin_sale/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
{
"name": "Account Invoice Margin Sale",
"summary": "Set margin in invoices from sale orders",
"version": "17.0.1.0.0",
"version": "18.0.1.0.0",
"development_status": "Production/Stable",
"maintainers": ["sergio-teruel", "carlosdauden"],
"category": "Account",
Expand Down
17 changes: 10 additions & 7 deletions account_invoice_margin_sale/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@

/*
:Author: David Goodger (goodger@python.org)
:Id: $Id: html4css1.css 8954 2022-01-20 10:10:25Z milde $
:Id: $Id: html4css1.css 9511 2024-01-13 09:50:07Z milde $
:Copyright: This stylesheet has been placed in the public domain.

Default cascading style sheet for the HTML output of Docutils.
Despite the name, some widely supported CSS2 features are used.

See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to
customize this style sheet.
Expand Down Expand Up @@ -274,7 +275,7 @@
margin-left: 2em ;
margin-right: 2em }

pre.code .ln { color: grey; } /* line numbers */
pre.code .ln { color: gray; } /* line numbers */
pre.code, code { background-color: #eeeeee }
pre.code .comment, code .comment { color: #5C6576 }
pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
Expand All @@ -300,7 +301,7 @@
span.pre {
white-space: pre }

span.problematic {
span.problematic, pre.problematic {
color: red }

span.section-subtitle {
Expand Down Expand Up @@ -368,7 +369,7 @@ <h1 class="title">Account Invoice Margin Sale</h1>
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:4b6cc430e226d789e638616e03761cc6c56aea0be0b262601335bd62ba16d253
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Production/Stable" src="https://img.shields.io/badge/maturity-Production%2FStable-green.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/margin-analysis/tree/17.0/account_invoice_margin_sale"><img alt="OCA/margin-analysis" src="https://img.shields.io/badge/github-OCA%2Fmargin--analysis-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/margin-analysis-17-0/margin-analysis-17-0-account_invoice_margin_sale"><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/margin-analysis&amp;target_branch=17.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Production/Stable" src="https://img.shields.io/badge/maturity-Production%2FStable-green.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/margin-analysis/tree/18.0/account_invoice_margin_sale"><img alt="OCA/margin-analysis" src="https://img.shields.io/badge/github-OCA%2Fmargin--analysis-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/margin-analysis-18-0/margin-analysis-18-0-account_invoice_margin_sale"><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/margin-analysis&amp;target_branch=18.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p>This module propagates purchase price from sale order line to invoice
and discards the invoice lines coming from sale order lines with
down-payment when computing the margin.</p>
Expand Down Expand Up @@ -403,7 +404,7 @@ <h1><a class="toc-backref" href="#toc-entry-3">Bug Tracker</a></h1>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/margin-analysis/issues">GitHub Issues</a>.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
<a class="reference external" href="https://github.com/OCA/margin-analysis/issues/new?body=module:%20account_invoice_margin_sale%0Aversion:%2017.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<a class="reference external" href="https://github.com/OCA/margin-analysis/issues/new?body=module:%20account_invoice_margin_sale%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<p>Do not contact contributors directly about support or help with technical issues.</p>
</div>
<div class="section" id="credits">
Expand Down Expand Up @@ -441,13 +442,15 @@ <h2><a class="toc-backref" href="#toc-entry-6">Contributors</a></h2>
<div class="section" id="maintainers">
<h2><a class="toc-backref" href="#toc-entry-7">Maintainers</a></h2>
<p>This module is maintained by the OCA.</p>
<a class="reference external image-reference" href="https://odoo-community.org"><img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" /></a>
<a class="reference external image-reference" href="https://odoo-community.org">
<img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" />
</a>
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.</p>
<p>Current <a class="reference external" href="https://odoo-community.org/page/maintainer-role">maintainers</a>:</p>
<p><a class="reference external image-reference" href="https://github.com/sergio-teruel"><img alt="sergio-teruel" src="https://github.com/sergio-teruel.png?size=40px" /></a> <a class="reference external image-reference" href="https://github.com/carlosdauden"><img alt="carlosdauden" src="https://github.com/carlosdauden.png?size=40px" /></a></p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/margin-analysis/tree/17.0/account_invoice_margin_sale">OCA/margin-analysis</a> project on GitHub.</p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/margin-analysis/tree/18.0/account_invoice_margin_sale">OCA/margin-analysis</a> project on GitHub.</p>
<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>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,14 @@
# Copyright 2019 Tecnativa - Carlos Dauden
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from odoo.fields import Command
from odoo.tests.common import TransactionCase

from odoo.addons.base.tests.common import DISABLED_MAIL_CONTEXT


class TestAccountInvoiceMargin(TransactionCase):
@classmethod
def setUpClass(cls):
super().setUpClass()
cls.env = cls.env(context=dict(cls.env.context, **DISABLED_MAIL_CONTEXT))
cls.journal = cls.env["account.journal"].create(
{"name": "Test journal", "type": "sale", "code": "TEST_J"}
)
Expand Down Expand Up @@ -50,9 +48,7 @@ def setUpClass(cls):
"partner_id": cls.partner.id,
"pricelist_id": pricelist.id,
"order_line": [
(
0,
0,
Command.create(
{
"name": cls.product.name,
"product_id": cls.product.id,
Expand Down Expand Up @@ -89,9 +85,7 @@ def test_invoice_down_payment(self):
{
"partner_id": self.partner.id,
"order_line": [
(
0,
False,
Command.create(
{
"product_id": product.id,
"name": "Testing Product",
Expand Down