[tryton-debian-vcs] tryton-modules-sale-complaint branch debian updated. debian/4.2.1-1-2-g8d908f3

Mathias Behrle tryton-debian-vcs at alioth.debian.org
Wed Jun 7 13:35:17 UTC 2017


The following commit has been merged in the debian branch:
https://alioth.debian.org/plugins/scmgit/cgi-bin/gitweb.cgi/?p=tryton/tryton-modules-sale-complaint.git;a=commitdiff;h=debian/4.2.1-1-2-g8d908f3

commit 8d908f3df6415c47106ba26adc53a7eccf01f4c4
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Wed Jun 7 15:26:55 2017 +0200

    Merging upstream version 4.4.0.

diff --git a/CHANGELOG b/CHANGELOG
index 7f8361b..3e63ed5 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,4 +1,4 @@
-Version 4.2.1 - 2017-02-06
+Version 4.4.0 - 2017-05-01
 * Bug fixes (see mercurial logs for details)
 
 Version 4.2.0 - 2016-11-28
diff --git a/PKG-INFO b/PKG-INFO
index 6e9350e..f22eca3 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,12 +1,12 @@
 Metadata-Version: 1.1
 Name: trytond_sale_complaint
-Version: 4.2.1
+Version: 4.4.0
 Summary: Tryton module for sale complaint
 Home-page: http://www.tryton.org/
 Author: Tryton
 Author-email: issue_tracker at tryton.org
 License: GPL-3
-Download-URL: http://downloads.tryton.org/4.2/
+Download-URL: http://downloads.tryton.org/4.4/
 Description: trytond_sale_complaint
         ======================
         
@@ -51,7 +51,7 @@ Classifier: Framework :: Tryton
 Classifier: Intended Audience :: Developers
 Classifier: Intended Audience :: Financial and Insurance Industry
 Classifier: Intended Audience :: Legal Industry
-Classifier: License :: OSI Approved :: GNU General Public License (GPL)
+Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
 Classifier: Natural Language :: Bulgarian
 Classifier: Natural Language :: Catalan
 Classifier: Natural Language :: Chinese (Simplified)
diff --git a/__init__.py b/__init__.py
index f8a5cb4..acce84f 100644
--- a/__init__.py
+++ b/__init__.py
@@ -15,6 +15,7 @@ def register():
         Action_SaleLine,
         Action_InvoiceLine,
         Configuration,
+        ConfigurationSequence,
         Sale,
         InvoiceLine,
         module='sale_complaint', type_='model')
diff --git a/complaint.xml b/complaint.xml
index 6a00396..2fc460e 100644
--- a/complaint.xml
+++ b/complaint.xml
@@ -119,7 +119,7 @@ this repository contains the full copyright notices and license terms. -->
             <field name="name">Customer Complaints</field>
             <field name="res_model">sale.complaint</field>
             <field name="domain"
-                eval="[('customer', 'in', Eval('active_ids'))]"
+                eval="[If(Eval('active_ids', []) == [Eval('active_id')], ('customer', '=', Eval('active_id')), ('customer', 'in', Eval('active_ids')))]"
                 pyson="1"/>
         </record>
         <record model="ir.action.act_window.view"
diff --git a/locale/bg.po b/locale/bg.po
index da42166..ca75fb6 100644
--- a/locale/bg.po
+++ b/locale/bg.po
@@ -305,6 +305,10 @@ msgctxt "field:sale.configuration,complaint_sequence:"
 msgid "Complaint Sequence"
 msgstr ""
 
+msgctxt "field:sale.configuration.sequence,complaint_sequence:"
+msgid "Complaint Sequence"
+msgstr ""
+
 msgctxt "help:sale.complaint.action,invoice_lines:"
 msgid "Leave empty for all lines"
 msgstr ""
diff --git a/locale/ca.po b/locale/ca.po
index b3a49d1..7f60d05 100644
--- a/locale/ca.po
+++ b/locale/ca.po
@@ -250,6 +250,10 @@ msgctxt "field:sale.configuration,complaint_sequence:"
 msgid "Complaint Sequence"
 msgstr "Seqüència de reclamació"
 
+msgctxt "field:sale.configuration.sequence,complaint_sequence:"
+msgid "Complaint Sequence"
+msgstr "Seqüència de reclamació"
+
 msgctxt "help:sale.complaint.action,invoice_lines:"
 msgid "Leave empty for all lines"
 msgstr "Deixeu-lo buit per totes les línies."
diff --git a/locale/cs.po b/locale/cs.po
index 6fe66cc..3caddda 100644
--- a/locale/cs.po
+++ b/locale/cs.po
@@ -256,6 +256,10 @@ msgctxt "field:sale.configuration,complaint_sequence:"
 msgid "Complaint Sequence"
 msgstr ""
 
+msgctxt "field:sale.configuration.sequence,complaint_sequence:"
+msgid "Complaint Sequence"
+msgstr ""
+
 msgctxt "help:sale.complaint.action,invoice_lines:"
 msgid "Leave empty for all lines"
 msgstr ""
diff --git a/locale/de.po b/locale/de.po
index ed3e4f8..0d451ea 100644
--- a/locale/de.po
+++ b/locale/de.po
@@ -250,6 +250,10 @@ msgctxt "field:sale.configuration,complaint_sequence:"
 msgid "Complaint Sequence"
 msgstr "Nummernkreis Reklamation"
 
+msgctxt "field:sale.configuration.sequence,complaint_sequence:"
+msgid "Complaint Sequence"
+msgstr "Nummernkreis Reklamation"
+
 msgctxt "help:sale.complaint.action,invoice_lines:"
 msgid "Leave empty for all lines"
 msgstr "Leer lassen für alle Zeilen"
diff --git a/locale/es.po b/locale/es.po
index 0dce862..b502354 100644
--- a/locale/es.po
+++ b/locale/es.po
@@ -250,6 +250,10 @@ msgctxt "field:sale.configuration,complaint_sequence:"
 msgid "Complaint Sequence"
 msgstr "Secuencia de reclamación"
 
+msgctxt "field:sale.configuration.sequence,complaint_sequence:"
+msgid "Complaint Sequence"
+msgstr "Secuencia de reclamación"
+
 msgctxt "help:sale.complaint.action,invoice_lines:"
 msgid "Leave empty for all lines"
 msgstr "Dejarlo vacío para todas las líneas."
diff --git a/locale/es_419.po b/locale/es_419.po
index 33a2b3f..a3c2d56 100644
--- a/locale/es_419.po
+++ b/locale/es_419.po
@@ -28,7 +28,7 @@ msgstr ""
 
 msgctxt "field:sale.complaint,create_uid:"
 msgid "Create User"
-msgstr ""
+msgstr "Creado por usuario"
 
 msgctxt "field:sale.complaint,customer:"
 msgid "Customer"
@@ -78,10 +78,9 @@ msgctxt "field:sale.complaint,state:"
 msgid "State"
 msgstr ""
 
-#, fuzzy
 msgctxt "field:sale.complaint,type:"
 msgid "Type"
-msgstr "Types"
+msgstr ""
 
 msgctxt "field:sale.complaint,write_date:"
 msgid "Write Date"
@@ -89,16 +88,15 @@ msgstr ""
 
 msgctxt "field:sale.complaint,write_uid:"
 msgid "Write User"
-msgstr ""
+msgstr "Modificado por usuario"
 
 msgctxt "field:sale.complaint.action,action:"
 msgid "Action"
 msgstr ""
 
-#, fuzzy
 msgctxt "field:sale.complaint.action,complaint:"
 msgid "Complaint"
-msgstr "Complaints"
+msgstr ""
 
 msgctxt "field:sale.complaint.action,create_date:"
 msgid "Create Date"
@@ -106,7 +104,7 @@ msgstr ""
 
 msgctxt "field:sale.complaint.action,create_uid:"
 msgid "Create User"
-msgstr ""
+msgstr "Creado por usuario"
 
 msgctxt "field:sale.complaint.action,id:"
 msgid "ID"
@@ -142,7 +140,7 @@ msgstr ""
 
 msgctxt "field:sale.complaint.action,unit_price:"
 msgid "Unit Price"
-msgstr ""
+msgstr "Precio unitario"
 
 msgctxt "field:sale.complaint.action,write_date:"
 msgid "Write Date"
@@ -150,7 +148,7 @@ msgstr ""
 
 msgctxt "field:sale.complaint.action,write_uid:"
 msgid "Write User"
-msgstr ""
+msgstr "Modificado por usuario"
 
 msgctxt "field:sale.complaint.action-account.invoice.line,action:"
 msgid "Action"
@@ -162,7 +160,7 @@ msgstr ""
 
 msgctxt "field:sale.complaint.action-account.invoice.line,create_uid:"
 msgid "Create User"
-msgstr ""
+msgstr "Creado por usuario"
 
 msgctxt "field:sale.complaint.action-account.invoice.line,id:"
 msgid "ID"
@@ -182,7 +180,7 @@ msgstr ""
 
 msgctxt "field:sale.complaint.action-account.invoice.line,write_uid:"
 msgid "Write User"
-msgstr ""
+msgstr "Modificado por usuario"
 
 msgctxt "field:sale.complaint.action-sale.line,action:"
 msgid "Action"
@@ -194,7 +192,7 @@ msgstr ""
 
 msgctxt "field:sale.complaint.action-sale.line,create_uid:"
 msgid "Create User"
-msgstr ""
+msgstr "Creado por usuario"
 
 msgctxt "field:sale.complaint.action-sale.line,id:"
 msgid "ID"
@@ -214,7 +212,7 @@ msgstr ""
 
 msgctxt "field:sale.complaint.action-sale.line,write_uid:"
 msgid "Write User"
-msgstr ""
+msgstr "Modificado por usuario"
 
 msgctxt "field:sale.complaint.type,create_date:"
 msgid "Create Date"
@@ -222,7 +220,7 @@ msgstr ""
 
 msgctxt "field:sale.complaint.type,create_uid:"
 msgid "Create User"
-msgstr ""
+msgstr "Creado por usuario"
 
 msgctxt "field:sale.complaint.type,id:"
 msgid "ID"
@@ -246,12 +244,16 @@ msgstr ""
 
 msgctxt "field:sale.complaint.type,write_uid:"
 msgid "Write User"
-msgstr ""
+msgstr "Modificado por usuario"
 
 msgctxt "field:sale.configuration,complaint_sequence:"
 msgid "Complaint Sequence"
 msgstr ""
 
+msgctxt "field:sale.configuration.sequence,complaint_sequence:"
+msgid "Complaint Sequence"
+msgstr ""
+
 msgctxt "help:sale.complaint.action,invoice_lines:"
 msgid "Leave empty for all lines"
 msgstr ""
@@ -270,68 +272,66 @@ msgstr ""
 
 msgctxt "model:ir.action,name:act_complaint_form"
 msgid "Complaints"
-msgstr "Complaints"
+msgstr ""
 
 msgctxt "model:ir.action,name:act_complaint_relate_party"
 msgid "Customer Complaints"
-msgstr "Customer Complaints"
+msgstr ""
 
 msgctxt "model:ir.action,name:act_complaint_relate_sale"
 msgid "Complaints"
-msgstr "Complaints"
+msgstr ""
 
 msgctxt "model:ir.action,name:act_type_form"
 msgid "Types"
-msgstr "Types"
+msgstr ""
 
 msgctxt "model:ir.action.act_window.domain,name:act_complaint_form_domain_all"
 msgid "All"
-msgstr "All"
+msgstr ""
 
 msgctxt ""
 "model:ir.action.act_window.domain,name:act_complaint_form_domain_approved"
 msgid "Approved"
-msgstr "Approved"
+msgstr ""
 
 msgctxt ""
 "model:ir.action.act_window.domain,name:act_complaint_form_domain_draft"
 msgid "Draft"
-msgstr "Draft"
+msgstr ""
 
 msgctxt ""
 "model:ir.action.act_window.domain,name:act_complaint_form_domain_waiting"
 msgid "Waiting"
-msgstr "Waiting"
+msgstr ""
 
 msgctxt "model:ir.sequence,name:sequence_complaint"
 msgid "Customer Complaint"
-msgstr "Customer Complaint"
+msgstr ""
 
 msgctxt "model:ir.sequence.type,name:sequence_type_complaint"
 msgid "Customer Complaint"
-msgstr "Customer Complaint"
+msgstr ""
 
 msgctxt "model:ir.ui.menu,name:menu_complaint"
 msgid "Complaints"
-msgstr "Complaints"
+msgstr ""
 
 msgctxt "model:ir.ui.menu,name:menu_configuration"
 msgid "Customer Complaint"
-msgstr "Customer Complaint"
+msgstr ""
 
 msgctxt "model:ir.ui.menu,name:menu_type"
 msgid "Types"
-msgstr "Types"
+msgstr ""
 
-#, fuzzy
 msgctxt "model:sale.complaint,name:"
 msgid "Customer Complaint"
-msgstr "Customer Complaint"
+msgstr ""
 
-#, fuzzy
 msgctxt "model:sale.complaint.action,name:"
 msgid "Customer Complaint Action"
-msgstr "Customer Complaint"
+msgstr ""
 
 msgctxt "model:sale.complaint.action-account.invoice.line,name:"
 msgid "Customer Complaint Action - Invoice Line"
@@ -341,15 +341,13 @@ msgctxt "model:sale.complaint.action-sale.line,name:"
 msgid "Customer Complaint Action - Sale Line"
 msgstr ""
 
-#, fuzzy
 msgctxt "model:sale.complaint.type,name:"
 msgid "Customer Complaint Type"
-msgstr "Customer Complaint"
+msgstr ""
 
-#, fuzzy
 msgctxt "selection:sale.complaint,state:"
 msgid "Approved"
-msgstr "Approved"
+msgstr ""
 
 msgctxt "selection:sale.complaint,state:"
 msgid "Cancelled"
@@ -359,46 +357,41 @@ msgctxt "selection:sale.complaint,state:"
 msgid "Done"
 msgstr ""
 
-#, fuzzy
 msgctxt "selection:sale.complaint,state:"
 msgid "Draft"
-msgstr "Draft"
+msgstr ""
 
 msgctxt "selection:sale.complaint,state:"
 msgid "Rejected"
 msgstr ""
 
-#, fuzzy
 msgctxt "selection:sale.complaint,state:"
 msgid "Waiting"
-msgstr "Waiting"
+msgstr ""
 
 msgctxt "selection:sale.complaint.action,action:"
 msgid "Create Credit Note"
-msgstr ""
+msgstr "Crear nota de crédito"
 
 msgctxt "selection:sale.complaint.action,action:"
 msgid "Create Sale Return"
-msgstr ""
+msgstr "Crear devolución de venta"
 
-#, fuzzy
 msgctxt "view:sale.complaint:"
 msgid "Approve"
-msgstr "Approved"
+msgstr ""
 
 msgctxt "view:sale.complaint:"
 msgid "Cancel"
 msgstr ""
 
-#, fuzzy
 msgctxt "view:sale.complaint:"
 msgid "Complaint"
-msgstr "Complaints"
+msgstr ""
 
-#, fuzzy
 msgctxt "view:sale.complaint:"
 msgid "Draft"
-msgstr "Draft"
+msgstr ""
 
 msgctxt "view:sale.complaint:"
 msgid "Process"
diff --git a/locale/fr.po b/locale/fr.po
index 25bfaec..5ff4ff0 100644
--- a/locale/fr.po
+++ b/locale/fr.po
@@ -251,6 +251,10 @@ msgctxt "field:sale.configuration,complaint_sequence:"
 msgid "Complaint Sequence"
 msgstr "Séquence de plainte"
 
+msgctxt "field:sale.configuration.sequence,complaint_sequence:"
+msgid "Complaint Sequence"
+msgstr "Séquence de plainte"
+
 msgctxt "help:sale.complaint.action,invoice_lines:"
 msgid "Leave empty for all lines"
 msgstr "Laisser vide pour toutes les lignes"
diff --git a/locale/hu_HU.po b/locale/hu_HU.po
index f118cca..b0cfb08 100644
--- a/locale/hu_HU.po
+++ b/locale/hu_HU.po
@@ -250,6 +250,11 @@ msgctxt "field:sale.configuration,complaint_sequence:"
 msgid "Complaint Sequence"
 msgstr "Reklamáció számkör"
 
+#, fuzzy
+msgctxt "field:sale.configuration.sequence,complaint_sequence:"
+msgid "Complaint Sequence"
+msgstr "Reklamáció számkör"
+
 msgctxt "help:sale.complaint.action,invoice_lines:"
 msgid "Leave empty for all lines"
 msgstr "Üresen hagyni a soroknak"
diff --git a/locale/it_IT.po b/locale/it_IT.po
index 72ba668..f5041e2 100644
--- a/locale/it_IT.po
+++ b/locale/it_IT.po
@@ -250,6 +250,11 @@ msgctxt "field:sale.configuration,complaint_sequence:"
 msgid "Complaint Sequence"
 msgstr "sequenza reclamo"
 
+#, fuzzy
+msgctxt "field:sale.configuration.sequence,complaint_sequence:"
+msgid "Complaint Sequence"
+msgstr "sequenza reclamo"
+
 msgctxt "help:sale.complaint.action,invoice_lines:"
 msgid "Leave empty for all lines"
 msgstr "lasciare vuoto per tutte le righe"
diff --git a/locale/ja_JP.po b/locale/ja_JP.po
index 33a2b3f..1448c7d 100644
--- a/locale/ja_JP.po
+++ b/locale/ja_JP.po
@@ -252,6 +252,10 @@ msgctxt "field:sale.configuration,complaint_sequence:"
 msgid "Complaint Sequence"
 msgstr ""
 
+msgctxt "field:sale.configuration.sequence,complaint_sequence:"
+msgid "Complaint Sequence"
+msgstr ""
+
 msgctxt "help:sale.complaint.action,invoice_lines:"
 msgid "Leave empty for all lines"
 msgstr ""
diff --git a/locale/lo.po b/locale/lo.po
index fd987ea..2cab9c0 100644
--- a/locale/lo.po
+++ b/locale/lo.po
@@ -302,6 +302,10 @@ msgctxt "field:sale.configuration,complaint_sequence:"
 msgid "Complaint Sequence"
 msgstr ""
 
+msgctxt "field:sale.configuration.sequence,complaint_sequence:"
+msgid "Complaint Sequence"
+msgstr ""
+
 msgctxt "help:sale.complaint.action,invoice_lines:"
 msgid "Leave empty for all lines"
 msgstr ""
diff --git a/locale/lt.po b/locale/lt.po
index 6fe66cc..3caddda 100644
--- a/locale/lt.po
+++ b/locale/lt.po
@@ -256,6 +256,10 @@ msgctxt "field:sale.configuration,complaint_sequence:"
 msgid "Complaint Sequence"
 msgstr ""
 
+msgctxt "field:sale.configuration.sequence,complaint_sequence:"
+msgid "Complaint Sequence"
+msgstr ""
+
 msgctxt "help:sale.complaint.action,invoice_lines:"
 msgid "Leave empty for all lines"
 msgstr ""
diff --git a/locale/nl.po b/locale/nl.po
index 92cb0a5..f8044aa 100644
--- a/locale/nl.po
+++ b/locale/nl.po
@@ -305,6 +305,10 @@ msgctxt "field:sale.configuration,complaint_sequence:"
 msgid "Complaint Sequence"
 msgstr ""
 
+msgctxt "field:sale.configuration.sequence,complaint_sequence:"
+msgid "Complaint Sequence"
+msgstr ""
+
 msgctxt "help:sale.complaint.action,invoice_lines:"
 msgid "Leave empty for all lines"
 msgstr ""
diff --git a/locale/pl.po b/locale/pl.po
index 33a2b3f..1448c7d 100644
--- a/locale/pl.po
+++ b/locale/pl.po
@@ -252,6 +252,10 @@ msgctxt "field:sale.configuration,complaint_sequence:"
 msgid "Complaint Sequence"
 msgstr ""
 
+msgctxt "field:sale.configuration.sequence,complaint_sequence:"
+msgid "Complaint Sequence"
+msgstr ""
+
 msgctxt "help:sale.complaint.action,invoice_lines:"
 msgid "Leave empty for all lines"
 msgstr ""
diff --git a/locale/pt_BR.po b/locale/pt_BR.po
index cc37e9e..3f7ffbb 100644
--- a/locale/pt_BR.po
+++ b/locale/pt_BR.po
@@ -50,7 +50,6 @@ msgctxt "field:sale.complaint,id:"
 msgid "ID"
 msgstr "ID"
 
-#, fuzzy
 msgctxt "field:sale.complaint,number:"
 msgid "Number"
 msgstr "Número"
@@ -251,6 +250,10 @@ msgctxt "field:sale.configuration,complaint_sequence:"
 msgid "Complaint Sequence"
 msgstr "Sequência de Reclamação"
 
+msgctxt "field:sale.configuration.sequence,complaint_sequence:"
+msgid "Complaint Sequence"
+msgstr "Sequência de Reclamação"
+
 msgctxt "help:sale.complaint.action,invoice_lines:"
 msgid "Leave empty for all lines"
 msgstr "Deixe vazio para todas as linhas"
diff --git a/locale/ru.po b/locale/ru.po
index 80ac1dc..08a3deb 100644
--- a/locale/ru.po
+++ b/locale/ru.po
@@ -305,6 +305,10 @@ msgctxt "field:sale.configuration,complaint_sequence:"
 msgid "Complaint Sequence"
 msgstr ""
 
+msgctxt "field:sale.configuration.sequence,complaint_sequence:"
+msgid "Complaint Sequence"
+msgstr ""
+
 msgctxt "help:sale.complaint.action,invoice_lines:"
 msgid "Leave empty for all lines"
 msgstr ""
diff --git a/locale/sl.po b/locale/sl.po
index 48d8922..bf2ace0 100644
--- a/locale/sl.po
+++ b/locale/sl.po
@@ -250,6 +250,10 @@ msgctxt "field:sale.configuration,complaint_sequence:"
 msgid "Complaint Sequence"
 msgstr "Štetje reklamacij"
 
+msgctxt "field:sale.configuration.sequence,complaint_sequence:"
+msgid "Complaint Sequence"
+msgstr "Štetje reklamacij"
+
 msgctxt "help:sale.complaint.action,invoice_lines:"
 msgid "Leave empty for all lines"
 msgstr "Pusti prazno za vse postavke"
diff --git a/locale/zh_CN.po b/locale/zh_CN.po
index 32618b6..d091b19 100644
--- a/locale/zh_CN.po
+++ b/locale/zh_CN.po
@@ -289,6 +289,10 @@ msgctxt "field:sale.configuration,complaint_sequence:"
 msgid "Complaint Sequence"
 msgstr ""
 
+msgctxt "field:sale.configuration.sequence,complaint_sequence:"
+msgid "Complaint Sequence"
+msgstr ""
+
 msgctxt "help:sale.complaint.action,invoice_lines:"
 msgid "Leave empty for all lines"
 msgstr ""
diff --git a/sale.py b/sale.py
index 88e541a..38ef76a 100644
--- a/sale.py
+++ b/sale.py
@@ -2,26 +2,79 @@
 # this repository contains the full copyright notices and license terms.
 from __future__ import unicode_literals
 
-from trytond.pool import PoolMeta
+from trytond import backend
+from trytond.pool import PoolMeta, Pool
 from trytond.model import fields
 from trytond.pyson import Eval
 
-__all__ = ['Configuration', 'Sale']
+__all__ = ['Configuration', 'ConfigurationSequence', 'Sale']
 
 
 class Configuration:
     __metaclass__ = PoolMeta
     __name__ = 'sale.configuration'
 
-    complaint_sequence = fields.Property(fields.Many2One('ir.sequence',
-            'Complaint Sequence', domain=[
+    complaint_sequence = fields.MultiValue(fields.Many2One(
+            'ir.sequence', "Complaint Sequence",
+            domain=[
                 ('code', '=', 'sale.complaint'),
-                ['OR',
-                    ('company', '=', Eval('context', {}).get('company', -1)),
-                    ('company', '=', None),
-                    ],
+                ('company', 'in', [
+                        Eval('context', {}).get('company', -1), None]),
                 ]))
 
+    @classmethod
+    def multivalue_model(cls, field):
+        pool = Pool()
+        if field == 'complaint_sequence':
+            return pool.get('sale.configuration.sequence')
+        return super(Configuration, cls).multivalue_model(field)
+
+    @classmethod
+    def default_complaint_sequence(cls):
+        return cls.multivalue_model(
+            'complaint_sequence').default_complaint_sequence()
+
+
+class ConfigurationSequence:
+    __metaclass__ = PoolMeta
+    __name__ = 'sale.configuration.sequence'
+    complaint_sequence = fields.Many2One(
+        'ir.sequence', "Complaint Sequence",
+        domain=[
+            ('code', '=', 'sale.complaint'),
+            ('company', 'in', [Eval('company', -1), None]),
+            ],
+        depends=['company'])
+
+    @classmethod
+    def __register__(cls, module_name):
+        TableHandler = backend.get('TableHandler')
+        exist = TableHandler.table_exist(cls._table)
+        if exist:
+            table = TableHandler(cls, module_name)
+            exist &= table.column_exist('complaint_sequence')
+
+        super(ConfigurationSequence, cls).__register__(module_name)
+
+        if not exist:
+            cls._migrate_property([], [], [])
+
+    @classmethod
+    def _migrate_property(cls, field_names, value_names, fields):
+        field_names.append('complaint_sequence')
+        value_names.append('complaint_sequence')
+        super(ConfigurationSequence, cls)._migrate_property(
+            field_names, value_names, fields)
+
+    @classmethod
+    def default_complaint_sequence(cls):
+        pool = Pool()
+        ModelData = pool.get('ir.model.data')
+        try:
+            return ModelData.get_id('sale_complaint', 'sequence_complaint')
+        except KeyError:
+            return None
+
 
 class Sale:
     __metaclass__ = PoolMeta
diff --git a/sale.xml b/sale.xml
index 811b418..299f0ce 100644
--- a/sale.xml
+++ b/sale.xml
@@ -29,11 +29,4 @@ this repository contains the full copyright notices and license terms. -->
             <field name="code">sale.complaint</field>
         </record>
     </data>
-    <data noupdate="1">
-        <record model="ir.property" id="property_complaint_sequence">
-            <field name="field"
-                search="[('model.model', '=', 'sale.configuration'), ('name', '=', 'complaint_sequence')]"/>
-            <field name="value" eval="'ir.sequence,' + str(ref('sequence_complaint'))"/>
-        </record>
-    </data>
 </tryton>
diff --git a/setup.py b/setup.py
index 5044a6f..971c143 100644
--- a/setup.py
+++ b/setup.py
@@ -84,7 +84,7 @@ setup(name=name,
         'Intended Audience :: Developers',
         'Intended Audience :: Financial and Insurance Industry',
         'Intended Audience :: Legal Industry',
-        'License :: OSI Approved :: GNU General Public License (GPL)',
+        'License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)',
         'Natural Language :: Bulgarian',
         'Natural Language :: Catalan',
         'Natural Language :: Chinese (Simplified)',
diff --git a/tryton.cfg b/tryton.cfg
index 91d0aa5..58a3d74 100644
--- a/tryton.cfg
+++ b/tryton.cfg
@@ -1,5 +1,5 @@
 [tryton]
-version=4.2.1
+version=4.4.0
 depends:
     account_invoice
     company
diff --git a/trytond_sale_complaint.egg-info/PKG-INFO b/trytond_sale_complaint.egg-info/PKG-INFO
index 3b04882..3373845 100644
--- a/trytond_sale_complaint.egg-info/PKG-INFO
+++ b/trytond_sale_complaint.egg-info/PKG-INFO
@@ -1,12 +1,12 @@
 Metadata-Version: 1.1
 Name: trytond-sale-complaint
-Version: 4.2.1
+Version: 4.4.0
 Summary: Tryton module for sale complaint
 Home-page: http://www.tryton.org/
 Author: Tryton
 Author-email: issue_tracker at tryton.org
 License: GPL-3
-Download-URL: http://downloads.tryton.org/4.2/
+Download-URL: http://downloads.tryton.org/4.4/
 Description: trytond_sale_complaint
         ======================
         
@@ -51,7 +51,7 @@ Classifier: Framework :: Tryton
 Classifier: Intended Audience :: Developers
 Classifier: Intended Audience :: Financial and Insurance Industry
 Classifier: Intended Audience :: Legal Industry
-Classifier: License :: OSI Approved :: GNU General Public License (GPL)
+Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
 Classifier: Natural Language :: Bulgarian
 Classifier: Natural Language :: Catalan
 Classifier: Natural Language :: Chinese (Simplified)
diff --git a/trytond_sale_complaint.egg-info/requires.txt b/trytond_sale_complaint.egg-info/requires.txt
index 499e13c..472ab6a 100644
--- a/trytond_sale_complaint.egg-info/requires.txt
+++ b/trytond_sale_complaint.egg-info/requires.txt
@@ -1,5 +1,5 @@
-trytond_account_invoice >= 4.2, < 4.3
-trytond_company >= 4.2, < 4.3
-trytond_party >= 4.2, < 4.3
-trytond_sale >= 4.2, < 4.3
-trytond >= 4.2, < 4.3
+trytond_account_invoice >= 4.4, < 4.5
+trytond_company >= 4.4, < 4.5
+trytond_party >= 4.4, < 4.5
+trytond_sale >= 4.4, < 4.5
+trytond >= 4.4, < 4.5
diff --git a/view/complaint_form.xml b/view/complaint_form.xml
index c2293a4..2ea8a35 100644
--- a/view/complaint_form.xml
+++ b/view/complaint_form.xml
@@ -28,7 +28,7 @@ this repository contains the full copyright notices and license terms. -->
             <field name="actions" colspan="2"/>
             <label name="state"/>
             <field name="state"/>
-            <group col="6" colspan="2" id="buttons">
+            <group col="-1" colspan="2" id="buttons">
                 <button name="cancel" string="Cancel" icon="tryton-cancel"/>
                 <button name="draft" string="Draft"/>
                 <button name="wait" string="Wait" icon="tryton-go-next"/>
-- 
tryton-modules-sale-complaint



More information about the tryton-debian-vcs mailing list