Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[18.0][MIG] product_sequence: Migration to 18.0 #1780

Open
wants to merge 51 commits into
base: 18.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
f06bd01
[ADD] product_sequence: Allows to associate a sequence to the product…
Mar 2, 2012
0566e5c
[MERGE] merge translation commited by launchpad on extra-addons6.0
sebastienbeau May 17, 2012
1ad4450
[FIX] fix write all product with default_code together and then write…
bguillot Jul 6, 2012
913de85
[FIX] resetting sequence code when updating module
eLBati Aug 2, 2012
65e8ce7
[REM] use Model instead of osv.osv
Aug 21, 2012
9233423
[FIX] product_sequence : write should support list or integer
sebastienbeau Sep 26, 2012
b57808f
[MIGR] migration of product_sequence to openerp 7.0 (required for pro…
guewen Jan 30, 2013
0c62479
FIX description of module product_custom_attributes.
Feb 5, 2013
2b12458
Launchpad automatic translations update.
Mar 12, 2014
09d192c
Set all addons to uninstallable and move them into __unported__ folder
Jul 9, 2014
305c081
MIG product_sequence
Jan 13, 2015
902834a
Added german translation
Mar 31, 2015
b483faf
Add bug tracker link on README.rst
yvaucher May 22, 2015
24445f3
product_sequence
gdgellatly Jun 17, 2015
3af60e6
Add missing default oca icons
yvaucher Aug 18, 2015
72a2fc1
product_sequence (#156)
SodexisTeam Oct 24, 2016
6fec86b
[MIG][10.0] migrate product_sequence
atchuthan Oct 24, 2016
21502ac
OCA Transbot updated translations from Transifex
oca-transbot Nov 29, 2016
78bd2ee
[11.0][MIG/IMP] product_sequence:
LoisRForgeFlow Mar 20, 2018
d620116
fixes and adds tests
JordiBForgeFlow May 14, 2018
3aa0156
remove obsolete .pot files [ci skip]
sbidoul Jun 15, 2018
a203368
[UPD] Update product_sequence.pot
oca-travis Jun 21, 2018
8276c1d
[MIG] Migrated product_sequence to v12
sudhir-erpharbor Dec 6, 2018
ee2e929
[IMP] product_sequence: Suggested PR changes
Tardo Sep 27, 2019
7ed3259
[UPD] Update product_sequence.pot
oca-travis Oct 1, 2019
bccea05
Update translation files
oca-transbot Oct 19, 2019
ee263d3
[12.0][FIX] product_sequence: Keep default_code when copy products if…
sergio-teruel Dec 19, 2019
d1540df
product_sequence 12.0.1.0.1
OCA-git-bot Dec 19, 2019
acd05f7
[IMP] product_sequence: black, isort
sergio-teruel Jan 21, 2020
a797c33
[MIG] product_sequence: Migration to v13.0
sergio-teruel Jan 21, 2020
1e7e33c
[UPD] Update product_sequence.pot
oca-travis Jan 22, 2020
dca2b31
Update translation files
oca-transbot Jan 28, 2020
fc5e59d
Translated using Weblate (German)
benbrich Feb 20, 2020
61cd45e
pre-commit update
OCA-git-bot Mar 14, 2020
64658c6
Translated using Weblate (French)
didierdonze Jul 22, 2020
7243166
[UPD] Eficent -> ForgeFlow
MiquelRForgeFlow Oct 1, 2020
e0b40e1
[UPD] README.rst
OCA-git-bot Oct 1, 2020
2e0260a
[MIG] product_sequence: Migration to 14.0
watthanun Nov 20, 2020
d9f0e17
Use parent categories to determine the prefix if the category has no …
khaeusler Jan 22, 2021
53381ee
[MIG] product_sequence: Migration to 15.0
BertVGroenendael Mar 18, 2022
db34b11
[MIG] product_sequence: Migration to 16.0
marielejeune Oct 4, 2022
286569c
[FIX] product_sequence unit tests: invalidate_cache, refresh and flus…
marielejeune Nov 15, 2022
1176c8a
[IMP] product_sequence: allow creating in batch for product.product a…
marielejeune Nov 15, 2022
b81c65c
[FW][FIX]product_sequence: remove dependence
vib-adhoc Jan 26, 2023
71c8286
[IMP] product_sequence: test performance improvement
josep-tecnativa Oct 23, 2023
6b76367
[BOT] post-merge updates
OCA-git-bot Oct 30, 2023
d744044
[IMP] product_sequence: pre-commit auto fixes
NICO-SOLUTIONS Nov 21, 2023
e220735
[MIG] product_sequence: Migration to 17.0
NICO-SOLUTIONS Nov 21, 2023
c87cc55
[UPD] Update product_sequence.pot
Mar 11, 2024
7690c1e
[BOT] post-merge updates
OCA-git-bot Mar 11, 2024
4ce4a87
[MIG] product_sequence: Migration to 18.0
chrisb-c01 Nov 22, 2024
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
111 changes: 111 additions & 0 deletions product_sequence/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
================
Product Sequence
================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:721cb40dcc59ac2a2e56aa749db8c021f7a1e9384b66290a46f694ae7753a5ee
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
: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/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-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=18.0
:alt: Try me on Runboat

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

This module allows to associate a sequence to the product reference. The
reference (default code) is unique (SQL constraint) and required.

You can optionally specify different sequences for different product
categories.

**Table of contents**

.. contents::
:local:

Usage
=====

To specify a different sequence for a product category proceed as
follows:

1. Go to the a Product Category form view. (**note:** you will need to
install Inventory app to be able to access to the form view,
*Inventory > Configuration > Products > Products Categories*; or
create a menuitem manually).
2. Fill the *Prefix for Product Internal Reference* as desired.
3. Under the settings (Settings -> General Settings -> Product
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/18.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:%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.

Credits
=======

Authors
-------

* Zikzakmedia SL
* Sodexis

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]>
- Chris Bergman <[email protected]>

Maintainers
-----------

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

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/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: 2 additions & 0 deletions product_sequence/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from . import models
from .hooks import pre_init_hook
22 changes: 22 additions & 0 deletions product_sequence/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Copyright 2004 Tiny SPRL
# Copyright 2016 Sodexis
# Copyright 2018 ForgeFlow S.L.
# (http://www.forgeflow.com)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

{
"name": "Product Sequence",
"version": "18.0.1.0.0",
"author": "Zikzakmedia SL, Sodexis, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/product-attribute",
"license": "AGPL-3",
"category": "Product",
"depends": ["product"],
"data": [
"data/product_sequence.xml",
"views/product_category.xml",
"views/res_config_settings_views.xml",
],
"pre_init_hook": "pre_init_hook",
"installable": True,
}
8 changes: 8 additions & 0 deletions product_sequence/data/product_sequence.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<odoo noupdate="1">
<record id="seq_product_auto" model="ir.sequence">
<field name="name">Product</field>
<field name="code">product.product</field>
<field eval="5" name="padding" />
<field name="prefix">PR/</field>
</record>
</odoo>
18 changes: 18 additions & 0 deletions product_sequence/hooks.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Copyright 2004 Tiny SPRL
# Copyright 2016 Sodexis
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).


def pre_init_hook(env):
"""
Updates existing codes matching the default '/' or
empty. Primarily this ensures installation does not
fail for demo data.
:param cr: database cursor
:return: void
"""
env.cr.execute(
"UPDATE product_product "
"SET default_code = '!!mig!!' || id "
"WHERE default_code IS NULL OR default_code = '/';"
)
117 changes: 117 additions & 0 deletions product_sequence/i18n/ar.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * product_sequence
#
# Translators:
# OCA Transbot <[email protected]>, 2016
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-11-01 20:03+0000\n"
"PO-Revision-Date: 2016-11-01 20:03+0000\n"
"Last-Translator: OCA Transbot <[email protected]>, 2016\n"
"Language-Team: Arabic (https://www.transifex.com/oca/teams/23907/ar/)\n"
"Language: ar\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 "
"&& n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;\n"

#. module: product_sequence
#. odoo-python
#: code:addons/product_sequence/models/product_product.py:0
#, python-format
msgid "-copy"
msgstr ""

#. module: product_sequence
#: model:ir.model,name:product_sequence.model_res_company
msgid "Companies"
msgstr ""

#. module: product_sequence
#: model:ir.model,name:product_sequence.model_res_config_settings
msgid "Config Settings"
msgstr ""

#. module: product_sequence
#: model:ir.model.fields,field_description:product_sequence.field_product_product__default_code
msgid "Internal Reference"
msgstr ""

#. module: product_sequence
#: model:ir.model.fields,field_description:product_sequence.field_product_category__code_prefix
msgid "Prefix for Product Internal Reference"
msgstr ""

#. module: product_sequence
#: model:ir.model.fields,help:product_sequence.field_product_category__code_prefix
msgid ""
"Prefix used to generate the internal reference for products created with "
"this category. If blank the default sequence will be used."
msgstr ""

#. module: product_sequence
#: model:ir.model,name:product_sequence.model_product_category
msgid "Product Category"
msgstr ""

#. module: product_sequence
#: model:ir.model.fields,field_description:product_sequence.field_product_category__sequence_id
msgid "Product Sequence"
msgstr ""

#. module: product_sequence
#: model_terms:ir.ui.view,arch_db:product_sequence.res_config_settings_view_form
msgid "Product Sequences"
msgstr ""

#. module: product_sequence
#: model:ir.model,name:product_sequence.model_product_product
msgid "Product Variant"
msgstr ""

#. module: product_sequence
#: model:ir.model,name:product_sequence.model_ir_sequence
msgid "Sequence"
msgstr ""

#. module: product_sequence
#: model:ir.model.fields,help:product_sequence.field_product_product__default_code
msgid ""
"Set to '/' and save if you want a new internal reference to be proposed."
msgstr ""

#. module: product_sequence
#: model:ir.model.fields,help:product_sequence.field_product_category__sequence_id
msgid ""
"This field contains the information related to the numbering of the journal "
"entries of this journal."
msgstr ""

#. module: product_sequence
#: model:ir.model.fields,field_description:product_sequence.field_res_company__use_parent_categories_to_determine_prefix
#: model:ir.model.fields,field_description:product_sequence.field_res_config_settings__use_parent_categories_to_determine_prefix
#: model_terms:ir.ui.view,arch_db:product_sequence.res_config_settings_view_form
msgid "Use parent categories to determine the prefix"
msgstr ""

#. module: product_sequence
#: model_terms:ir.ui.view,arch_db:product_sequence.res_config_settings_view_form
msgid ""
"Use parent categories to determine the prefix if the category has no "
"settings for the prefix"
msgstr ""

#. module: product_sequence
#: model:ir.model.fields,help:product_sequence.field_res_company__use_parent_categories_to_determine_prefix
#: model:ir.model.fields,help:product_sequence.field_res_config_settings__use_parent_categories_to_determine_prefix
msgid ""
"Use parent categories to determine the prefix if the category has no "
"settings for the prefix."
msgstr ""

#~ msgid "Manufacturer"
#~ msgstr "مصنّع"
Loading
Loading