Skip to content

Commit

Permalink
[MIG] sale_order_priority: migrate to V17
Browse files Browse the repository at this point in the history
  • Loading branch information
astirpe authored and HeliconiaSolutions committed Feb 27, 2025
1 parent 0a8ffe5 commit 53475f7
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 11 deletions.
5 changes: 4 additions & 1 deletion sale_order_priority/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Sale Order Priority
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:c5074e723dd6038423a24b967bf0d1bd1193d10501f5550edfb17e269bac813e
!! source digest: sha256:c48e2ef04228de832267a35bf35cd234bd9db221d5b0bf604705828f2c910484
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
Expand Down Expand Up @@ -65,6 +65,9 @@ Contributors

- Simone Rubino <[email protected]>
- George Daramouskas <[email protected]>
- ``360ERP <https://www.360erp.com>``:

- Andrea Stirpe

Maintainers
-----------
Expand Down
2 changes: 1 addition & 1 deletion sale_order_priority/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{
"name": "Sale Order Priority",
"summary": "Define priority on sale orders",
"version": "15.0.1.0.1",
"version": "17.0.1.0.0",
"category": "Sale Workflow",
"website": "https://github.com/OCA/sale-workflow",
"author": "Agile Business Group, Odoo Community Association (OCA)",
Expand Down
2 changes: 1 addition & 1 deletion sale_order_priority/i18n/sale_order_priority.pot
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 15.0\n"
"Project-Id-Version: Odoo Server 17.0\n"
"Report-Msgid-Bugs-To: \n"
"Last-Translator: \n"
"Language-Team: \n"
Expand Down
5 changes: 3 additions & 2 deletions sale_order_priority/models/sale.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ class SaleOrder(models.Model):
store=True,
index=True,
tracking=True,
states={"done": [("readonly", True)], "cancel": [("readonly", True)]},
help="Priority for this sale order. "
"Setting manually a value here would set it as priority "
"for all the order lines",
Expand All @@ -37,7 +36,9 @@ def _compute_priority(self):
def _inverse_priority(self):
for order in self:
priority = order.priority
for line in order.order_line.filtered(lambda x: x.priority != priority):
for line in order.order_line.filtered(
lambda x, pr=priority: x.priority != pr
):
line.priority = priority

def action_confirm(self):
Expand Down
2 changes: 2 additions & 0 deletions sale_order_priority/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
- Simone Rubino \<<[email protected]>\>
- George Daramouskas \<<[email protected]>\>
- `360ERP <https://www.360erp.com>`:
- Andrea Stirpe
17 changes: 12 additions & 5 deletions sale_order_priority/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,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 @@ -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 @@ -366,7 +367,7 @@ <h1 class="title">Sale Order Priority</h1>
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:c5074e723dd6038423a24b967bf0d1bd1193d10501f5550edfb17e269bac813e
!! source digest: sha256:c48e2ef04228de832267a35bf35cd234bd9db221d5b0bf604705828f2c910484
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<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_priority"><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_priority"><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 module adds the field <em>Priority</em> in sale order lines and sale
Expand Down Expand Up @@ -409,12 +410,18 @@ <h2><a class="toc-backref" href="#toc-entry-4">Contributors</a></h2>
<ul class="simple">
<li>Simone Rubino &lt;<a class="reference external" href="mailto:simone.rubino&#64;agilebg.com">simone.rubino&#64;agilebg.com</a>&gt;</li>
<li>George Daramouskas &lt;<a class="reference external" href="mailto:gdaramouskas&#64;therp.nl">gdaramouskas&#64;therp.nl</a>&gt;</li>
<li><tt class="docutils literal">360ERP <span class="pre">&lt;https://www.360erp.com&gt;</span></tt>:<ul>
<li>Andrea Stirpe</li>
</ul>
</li>
</ul>
</div>
<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>
Expand Down
2 changes: 1 addition & 1 deletion sale_order_priority/views/sale.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<field name="inherit_id" ref="sale.view_order_form" />
<field name="arch" type="xml">
<group name="sales_person" position="inside">
<field name="priority" />
<field name="priority" readonly="state == 'cancel' or locked" />
</group>
<xpath
expr="//field[@name='order_line']//form//field[@name='price_unit']"
Expand Down

0 comments on commit 53475f7

Please sign in to comment.