Skip to content

Commit

Permalink
[MIG] sale_order_line_delivery_state: Migration to 17.0
Browse files Browse the repository at this point in the history
  • Loading branch information
bizzappdev committed Sep 28, 2024
1 parent 9c85587 commit eac4ac9
Show file tree
Hide file tree
Showing 10 changed files with 71 additions and 57 deletions.
41 changes: 22 additions & 19 deletions sale_order_line_delivery_state/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,32 +17,35 @@ Sale Order Line Delivery State
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fsale--workflow-lightgray.png?logo=github
:target: https://github.com/OCA/sale-workflow/tree/16.0/sale_order_line_delivery_state
:target: https://github.com/OCA/sale-workflow/tree/17.0/sale_order_line_delivery_state
:alt: OCA/sale-workflow
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/sale-workflow-16-0/sale-workflow-16-0-sale_order_line_delivery_state
:target: https://translation.odoo-community.org/projects/sale-workflow-17-0/sale-workflow-17-0-sale_order_line_delivery_state
: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/sale-workflow&target_branch=16.0
:target: https://runboat.odoo-community.org/builds?repo=OCA/sale-workflow&target_branch=17.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

This odoo module add delivery state on the sale order line. It is based on the
module sale_delivery_state, which adds the field at sale order level.
This odoo module add delivery state on the sale order line. It is based
on the module sale_delivery_state, which adds the field at sale order
level.

Delivery state is computed based on `qty_delivered` field on sale order line.
Delivery state is computed based on qty_delivered field on sale order
line.

The state of the sale order line can be forced to fully delivered in case
some quantities were cancelled by the customer and you consider you have
nothing more to deliver.
The state of the sale order line can be forced to fully delivered in
case some quantities were cancelled by the customer and you consider you
have nothing more to deliver.

Sale order lines can have products or services, as long as the field `qty_delivered`
is set, it will trigger the computation of delivery state.
Sale order lines can have products or services, as long as the field
qty_delivered is set, it will trigger the computation of delivery state.

This module also works with delivery.carrier fees that are added as a
sale order line. Thoses line are special as they will never be considered delivered.
Delivery fees lines are ignored in the computation of the delivery state.
sale order line. Thoses line are special as they will never be
considered delivered. Delivery fees lines are ignored in the computation
of the delivery state.

**Table of contents**

Expand All @@ -55,25 +58,25 @@ Bug Tracker
Bugs are tracked on `GitHub Issues <https://github.com/OCA/sale-workflow/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/sale-workflow/issues/new?body=module:%20sale_order_line_delivery_state%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
`feedback <https://github.com/OCA/sale-workflow/issues/new?body=module:%20sale_order_line_delivery_state%0Aversion:%2017.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.

Credits
=======

Authors
~~~~~~~
-------

* ForgeFlow

Contributors
~~~~~~~~~~~~
------------

* Jordi Masvidal <[email protected]>
- Jordi Masvidal <[email protected]>

Maintainers
~~~~~~~~~~~
-----------

This module is maintained by the OCA.

Expand All @@ -85,6 +88,6 @@ 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.

This module is part of the `OCA/sale-workflow <https://github.com/OCA/sale-workflow/tree/16.0/sale_order_line_delivery_state>`_ project on GitHub.
This module is part of the `OCA/sale-workflow <https://github.com/OCA/sale-workflow/tree/17.0/sale_order_line_delivery_state>`_ 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 sale_order_line_delivery_state/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{
"name": "Sale Order Line Delivery State",
"summary": "Show the delivery state on the sale order line",
"version": "16.0.1.0.0",
"version": "17.0.1.0.0",
"category": "Product",
"website": "https://github.com/OCA/sale-workflow",
"author": "ForgeFlow, Odoo Community Association (OCA)",
Expand Down
3 changes: 3 additions & 0 deletions sale_order_line_delivery_state/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["whool"]
build-backend = "whool.buildapi"
1 change: 1 addition & 0 deletions sale_order_line_delivery_state/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Jordi Masvidal \<<[email protected]>\>
1 change: 0 additions & 1 deletion sale_order_line_delivery_state/readme/CONTRIBUTORS.rst

This file was deleted.

18 changes: 18 additions & 0 deletions sale_order_line_delivery_state/readme/DESCRIPTION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
This odoo module add delivery state on the sale order line. It is based
on the module sale_delivery_state, which adds the field at sale order
level.

Delivery state is computed based on qty_delivered field on sale order
line.

The state of the sale order line can be forced to fully delivered in
case some quantities were cancelled by the customer and you consider you
have nothing more to deliver.

Sale order lines can have products or services, as long as the field
qty_delivered is set, it will trigger the computation of delivery state.

This module also works with delivery.carrier fees that are added as a
sale order line. Thoses line are special as they will never be
considered delivered. Delivery fees lines are ignored in the computation
of the delivery state.
15 changes: 0 additions & 15 deletions sale_order_line_delivery_state/readme/DESCRIPTION.rst

This file was deleted.

41 changes: 23 additions & 18 deletions sale_order_line_delivery_state/static/description/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
Expand All @@ -9,10 +8,11 @@

/*
:Author: David Goodger ([email protected])
: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 @@ -275,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 @@ -301,7 +301,7 @@
span.pre {
white-space: pre }

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

span.section-subtitle {
Expand Down Expand Up @@ -369,18 +369,21 @@ <h1 class="title">Sale Order Line Delivery State</h1>
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:5cf5407b168f49a6b8b3ae8cebd6c0acee426ef85373799140348c0c1364c1e3
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<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/sale-workflow/tree/16.0/sale_order_line_delivery_state"><img alt="OCA/sale-workflow" src="https://img.shields.io/badge/github-OCA%2Fsale--workflow-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/sale-workflow-16-0/sale-workflow-16-0-sale_order_line_delivery_state"><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/sale-workflow&amp;target_branch=16.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p>This odoo module add delivery state on the sale order line. It is based on the
module sale_delivery_state, which adds the field at sale order level.</p>
<p>Delivery state is computed based on <cite>qty_delivered</cite> field on sale order line.</p>
<p>The state of the sale order line can be forced to fully delivered in case
some quantities were cancelled by the customer and you consider you have
nothing more to deliver.</p>
<p>Sale order lines can have products or services, as long as the field <cite>qty_delivered</cite>
is set, it will trigger the computation of delivery state.</p>
<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/sale-workflow/tree/17.0/sale_order_line_delivery_state"><img alt="OCA/sale-workflow" src="https://img.shields.io/badge/github-OCA%2Fsale--workflow-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/sale-workflow-17-0/sale-workflow-17-0-sale_order_line_delivery_state"><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/sale-workflow&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>This odoo module add delivery state on the sale order line. It is based
on the module sale_delivery_state, which adds the field at sale order
level.</p>
<p>Delivery state is computed based on qty_delivered field on sale order
line.</p>
<p>The state of the sale order line can be forced to fully delivered in
case some quantities were cancelled by the customer and you consider you
have nothing more to deliver.</p>
<p>Sale order lines can have products or services, as long as the field
qty_delivered is set, it will trigger the computation of delivery state.</p>
<p>This module also works with delivery.carrier fees that are added as a
sale order line. Thoses line are special as they will never be considered delivered.
Delivery fees lines are ignored in the computation of the delivery state.</p>
sale order line. Thoses line are special as they will never be
considered delivered. Delivery fees lines are ignored in the computation
of the delivery state.</p>
<p><strong>Table of contents</strong></p>
<div class="contents local topic" id="contents">
<ul class="simple">
Expand All @@ -398,7 +401,7 @@ <h1><a class="toc-backref" href="#toc-entry-1">Bug Tracker</a></h1>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/sale-workflow/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/sale-workflow/issues/new?body=module:%20sale_order_line_delivery_state%0Aversion:%2016.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/sale-workflow/issues/new?body=module:%20sale_order_line_delivery_state%0Aversion:%2017.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 All @@ -418,11 +421,13 @@ <h2><a class="toc-backref" href="#toc-entry-4">Contributors</a></h2>
<div class="section" id="maintainers">
<h2><a class="toc-backref" href="#toc-entry-5">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>This module is part of the <a class="reference external" href="https://github.com/OCA/sale-workflow/tree/16.0/sale_order_line_delivery_state">OCA/sale-workflow</a> project on GitHub.</p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/sale-workflow/tree/17.0/sale_order_line_delivery_state">OCA/sale-workflow</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 @@ -14,7 +14,7 @@ def setUpClass(cls):
# Base data
partner = cls.env.ref("base.res_partner_2")
product = cls.env.ref("product.product_product_25")
pricelist = cls.env.ref("product.list0")
pricelist = cls.env["product.pricelist"].create({"name": "Test Pricelist"})
cls.uom = cls.env.ref("uom.product_uom_unit")
# Create delivery product
cls.delivery_cost = cls.env["product.product"].create(
Expand Down
4 changes: 2 additions & 2 deletions sale_order_line_delivery_state/views/sale_order_views.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@
type="object"
string="Force delivery done"
states="done"
attrs="{'invisible': ['|', ('force_delivery_state', '=', True), ('delivery_state', '=', 'done')]}"
invisible="['|', ('force_delivery_state', '=', True), ('delivery_state', '=', 'done')]"
/>
<button
name="action_unforce_delivery_state"
type="object"
string="Unforce delivery done"
states="done"
attrs="{'invisible': [('force_delivery_state', '=', False)]}"
invisible="[('force_delivery_state', '=', False)]"
/>
</div>
</xpath>
Expand Down

0 comments on commit eac4ac9

Please sign in to comment.