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

[12.0][MIG] product_sequence: Migration to 12.0 #507

Merged
merged 24 commits into from Oct 1, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
99355af
[ADD] product_sequence: Allows to associate a sequence to the product…
Mar 2, 2012
ac5af35
[MERGE] merge translation commited by launchpad on extra-addons6.0
sebastienbeau May 17, 2012
a757659
[FIX] fix write all product with default_code together and then write…
bguillot Jul 6, 2012
5d724b7
[FIX] resetting sequence code when updating module
eLBati Aug 2, 2012
5004cec
[REM] use Model instead of osv.osv
Aug 21, 2012
bd38f5b
[FIX] product_sequence : write should support list or integer
sebastienbeau Sep 26, 2012
ef059e9
[MIGR] migration of product_sequence to openerp 7.0 (required for pro…
guewen Jan 30, 2013
78a31da
FIX description of module product_custom_attributes.
Feb 5, 2013
6d1071e
Launchpad automatic translations update.
Mar 12, 2014
1238b03
Set all addons to uninstallable and move them into __unported__ folder
Jul 9, 2014
339f96e
MIG product_sequence
angelmoya Jan 13, 2015
943926a
Added german translation
Mar 31, 2015
9019ede
Add bug tracker link on README.rst
yvaucher May 22, 2015
4cfdd04
product_sequence
gdgellatly Jun 17, 2015
8b3dfc8
Add missing default oca icons
yvaucher Aug 18, 2015
a8f33ab
product_sequence (#156)
SodexisTeam Oct 24, 2016
cf0e426
[MIG][10.0] migrate product_sequence
atchuthan Oct 24, 2016
5b1988f
OCA Transbot updated translations from Transifex
oca-transbot Nov 29, 2016
76390ee
[11.0][MIG/IMP] product_sequence:
LoisRForgeFlow Mar 20, 2018
5e223f9
fixes and adds tests
JordiBForgeFlow May 14, 2018
1b4cb02
remove obsolete .pot files [ci skip]
sbidoul Jun 15, 2018
3f525b6
[UPD] Update product_sequence.pot
oca-travis Jun 21, 2018
668d507
[MIG] Migrated product_sequence to v12
sudhir-erpharbor Dec 6, 2018
69a12c3
[IMP] product_sequence: Suggested PR changes
Tardo Sep 27, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
98 changes: 98 additions & 0 deletions product_sequence/README.rst
@@ -0,0 +1,98 @@
================
Product Sequence
================

.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |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/12.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-12-0/product-attribute-12-0-product_sequence
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
:target: https://runbot.odoo-community.org/runbot/135/12.0
:alt: Try me on Runbot

|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:

#. 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).
#. Fill the *Prefix for Product Internal Reference* as desired.

.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
:alt: Try me on Runbot
: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 smashing it by providing a detailed and welcomed
`feedback <https://github.com/OCA/product-attribute/issues/new?body=module:%20product_sequence%0Aversion:%2012.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 <angel.moya@domatix.com>
* Graeme Gellatly <g@o4sb.com>
* Sodexis <dev@sodexis.com>
* Lois Rilo <lois.rilo@eficent.com>
* Sudhir Arya <sudhir@erpharbor.com>
* Alexandre Díaz <alexandre.diaz@tecnativa.com>

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/12.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
@@ -0,0 +1,2 @@
from . import models
from .hooks import pre_init_hook
24 changes: 24 additions & 0 deletions product_sequence/__manifest__.py
@@ -0,0 +1,24 @@
# Copyright 2004 Tiny SPRL
# Copyright 2016 Sodexis
# Copyright 2018 Eficent Business and IT Consulting Services S.L.
# (http://www.eficent.com)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

{
'name': 'Product Sequence',
'version': '12.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',
'product_code_unique',
],
'data': [
'data/product_sequence.xml',
'views/product_category.xml',
],
'pre_init_hook': 'pre_init_hook',
'installable': True,
}
11 changes: 11 additions & 0 deletions product_sequence/data/product_sequence.xml
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-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
@@ -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(cr):
"""
Updates existing codes matching the default '/' or
empty. Primarily this ensures installation does not
fail for demo data.
:param cr: database cursor
:return: void
"""
cr.execute(
"UPDATE product_product "
"SET default_code = '!!mig!!' || id "
"WHERE default_code IS NULL OR default_code = '/';"
)
68 changes: 68 additions & 0 deletions product_sequence/i18n/ar.po
@@ -0,0 +1,68 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * product_sequence
#
# Translators:
# OCA Transbot <transbot@odoo-community.org>, 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 <transbot@odoo-community.org>, 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
#: code:addons/product_sequence/models/product_product.py:74
#, python-format
msgid "-copy"
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_product
msgid "Product"
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
#: sql_constraint:product.product:0
msgid "The reference must be unique"
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 ""

#~ msgid "Manufacturer"
#~ msgstr "مصنّع"
67 changes: 67 additions & 0 deletions product_sequence/i18n/bg.po
@@ -0,0 +1,67 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * product_sequence
#
# Translators:
# OCA Transbot <transbot@odoo-community.org>, 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 <transbot@odoo-community.org>, 2016\n"
"Language-Team: Bulgarian (https://www.transifex.com/oca/teams/23907/bg/)\n"
"Language: bg\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

#. module: product_sequence
#: code:addons/product_sequence/models/product_product.py:74
#, python-format
msgid "-copy"
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_product
msgid "Product"
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
#: sql_constraint:product.product:0
msgid "The reference must be unique"
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 ""

#~ msgid "Manufacturer"
#~ msgstr "Производител"
68 changes: 68 additions & 0 deletions product_sequence/i18n/bs.po
@@ -0,0 +1,68 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * product_sequence
#
# Translators:
# OCA Transbot <transbot@odoo-community.org>, 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 <transbot@odoo-community.org>, 2016\n"
"Language-Team: Bosnian (https://www.transifex.com/oca/teams/23907/bs/)\n"
"Language: bs\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"

#. module: product_sequence
#: code:addons/product_sequence/models/product_product.py:74
#, python-format
msgid "-copy"
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_product
msgid "Product"
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
#: sql_constraint:product.product:0
msgid "The reference must be unique"
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 ""

#~ msgid "Manufacturer"
#~ msgstr "Proizvođač"