Skip to content

Commit

Permalink
[MIG] product_sequence: Migration to 18.0
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisb-c01 committed Jan 4, 2025
1 parent 7690c1e commit 6dec2bd
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 34 deletions.
36 changes: 16 additions & 20 deletions product_sequence/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ Product Sequence
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fproduct--attribute-lightgray.png?logo=github
:target: https://github.com/OCA/product-attribute/tree/17.0/product_sequence
:target: https://github.com/OCA/product-attribute/tree/18.0/product_sequence
:alt: OCA/product-attribute
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/product-attribute-17-0/product-attribute-17-0-product_sequence
:target: https://translation.odoo-community.org/projects/product-attribute-18-0/product-attribute-18-0-product_sequence
: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/product-attribute&target_branch=17.0
:target: https://runboat.odoo-community.org/builds?repo=OCA/product-attribute&target_branch=18.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|
Expand Down Expand Up @@ -54,18 +54,13 @@ follows:
Sequences), you can specify whether the prefix of the parent category
should be used if no prefix has been specified for the category.

|Try me on Runbot|

.. |Try me on Runbot| image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
:target: https://runbot.odoo-community.org/runbot/135/12.0

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/product-attribute/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/product-attribute/issues/new?body=module:%20product_sequence%0Aversion:%2017.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
`feedback <https://github.com/OCA/product-attribute/issues/new?body=module:%20product_sequence%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 @@ -81,16 +76,17 @@ Authors
Contributors
------------

- Angel Moya <[email protected]>
- Graeme Gellatly <[email protected]>
- Sodexis <[email protected]>
- Lois Rilo <[email protected]>
- Sudhir Arya <[email protected]>
- Alexandre Díaz <[email protected]>
- Sergio Teruel <[email protected]>
- Watthanun Khorchai <[email protected]>
- Marie Lejeune <[email protected]>
- Nils Coenen <[email protected]>
- Angel Moya <[email protected]>
- Graeme Gellatly <[email protected]>
- Sodexis <[email protected]>
- Lois Rilo <[email protected]>
- Sudhir Arya <[email protected]>
- Alexandre Díaz <[email protected]>
- Sergio Teruel <[email protected]>
- Watthanun Khorchai <[email protected]>
- Marie Lejeune <[email protected]>
- Nils Coenen <[email protected]>
- Chris Bergman <[email protected]>

Maintainers
-----------
Expand All @@ -105,6 +101,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/product-attribute <https://github.com/OCA/product-attribute/tree/17.0/product_sequence>`_ project on GitHub.
This module is part of the `OCA/product-attribute <https://github.com/OCA/product-attribute/tree/18.0/product_sequence>`_ 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 product_sequence/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

{
"name": "Product Sequence",
"version": "17.0.1.0.0",
"version": "18.0.1.0.0",
"author": "Zikzakmedia SL, Sodexis, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/product-attribute",
"license": "AGPL-3",
Expand Down
5 changes: 2 additions & 3 deletions product_sequence/models/product_product.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# (http://www.forgeflow.com)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from odoo import _, api, fields, models
from odoo import api, fields, models


class ProductProduct(models.Model):
Expand Down Expand Up @@ -59,10 +59,9 @@ def write(self, vals):
return True
return super().write(vals)

@api.returns("self", lambda value: value.id)
def copy(self, default=None):
if default is None:
default = {}
if self.default_code and "default_code" not in default:
default.update({"default_code": self.default_code + _("-copy")})
default.update({"default_code": self.default_code + self.env._("-copy")})
return super().copy(default)
1 change: 1 addition & 0 deletions product_sequence/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@
- Watthanun Khorchai \<<[email protected]>\>
- Marie Lejeune \<<[email protected]>\>
- Nils Coenen \<<[email protected]>\>
- Chris Bergman \<<[email protected]>\>
2 changes: 0 additions & 2 deletions product_sequence/readme/USAGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,3 @@ follows:
Sequences), you can specify whether the prefix of the parent
category should be used if no prefix has been specified for the
category.

[![Try me on Runbot](https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas)](https://runbot.odoo-community.org/runbot/135/12.0)
19 changes: 11 additions & 8 deletions product_sequence/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 @@ -368,7 +369,7 @@ <h1 class="title">Product Sequence</h1>
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:721cb40dcc59ac2a2e56aa749db8c021f7a1e9384b66290a46f694ae7753a5ee
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<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/product-attribute/tree/17.0/product_sequence"><img alt="OCA/product-attribute" src="https://img.shields.io/badge/github-OCA%2Fproduct--attribute-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/product-attribute-17-0/product-attribute-17-0-product_sequence"><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/product-attribute&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="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/product-attribute/tree/18.0/product_sequence"><img alt="OCA/product-attribute" src="https://img.shields.io/badge/github-OCA%2Fproduct--attribute-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/product-attribute-18-0/product-attribute-18-0-product_sequence"><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/product-attribute&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 allows to associate a sequence to the product reference. The
reference (default code) is unique (SQL constraint) and required.</p>
<p>You can optionally specify different sequences for different product
Expand Down Expand Up @@ -400,14 +401,13 @@ <h1><a class="toc-backref" href="#toc-entry-1">Usage</a></h1>
Sequences), you can specify whether the prefix of the parent category
should be used if no prefix has been specified for the category.</li>
</ol>
<p><a class="reference external image-reference" href="https://runbot.odoo-community.org/runbot/135/12.0"><img alt="Try me on Runbot" src="https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas" /></a></p>
</div>
<div class="section" id="bug-tracker">
<h1><a class="toc-backref" href="#toc-entry-2">Bug Tracker</a></h1>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/product-attribute/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/product-attribute/issues/new?body=module:%20product_sequence%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/product-attribute/issues/new?body=module:%20product_sequence%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 All @@ -432,16 +432,19 @@ <h2><a class="toc-backref" href="#toc-entry-5">Contributors</a></h2>
<li>Watthanun Khorchai &lt;<a class="reference external" href="mailto:watthanun_t&#64;hotmail.com">watthanun_t&#64;hotmail.com</a>&gt;</li>
<li>Marie Lejeune &lt;<a class="reference external" href="mailto:marie.lejeune&#64;acsone.eu">marie.lejeune&#64;acsone.eu</a>&gt;</li>
<li>Nils Coenen &lt;<a class="reference external" href="mailto:nils.coenen&#64;nico-solutions.de">nils.coenen&#64;nico-solutions.de</a>&gt;</li>
<li>Chris Bergman &lt;<a class="reference external" href="mailto:chris.bergman&#64;codeforward.nl">chris.bergman&#64;codeforward.nl</a>&gt;</li>
</ul>
</div>
<div class="section" id="maintainers">
<h2><a class="toc-backref" href="#toc-entry-6">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/product-attribute/tree/17.0/product_sequence">OCA/product-attribute</a> project on GitHub.</p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/product-attribute/tree/18.0/product_sequence">OCA/product-attribute</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

0 comments on commit 6dec2bd

Please sign in to comment.