Migrate to 6.0

This commit is contained in:
Sergio Morillo 2021-09-25 16:20:35 +02:00
parent e656a72cc6
commit d7801c75ab
4 changed files with 18 additions and 2 deletions

View File

@ -2,6 +2,10 @@
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "model:ir.message,text:msg_stock_location_state_date_location_uniq"
msgid "Combination of Date and Location must be unique."
msgstr "Combinación de fecha y ubicación debe ser única."
msgctxt "field:stock.location,states:"
msgid "History State"
msgstr "Historial de estados"

View File

@ -9,7 +9,6 @@ from trytond.model import ModelSQL, ModelView, fields, Unique
from trytond.pool import PoolMeta, Pool
from trytond.pyson import Eval, Or, If
from trytond.transaction import Transaction
from trytond import backend
from itertools import groupby
STATES = [
@ -333,7 +332,8 @@ class LocationState(ModelSQL, ModelView):
t = cls.__table__()
cls._sql_constraints += [
('date_location_uniq', Unique(t, t.date, t.location),
'Combination of Date and Location must be unique.'),
'stock_location_history_state.'
'msg_stock_location_state_date_location_uniq'),
]
@classmethod

11
message.xml Normal file
View File

@ -0,0 +1,11 @@
<?xml version="1.0"?>
<!-- The COPYRIGHT file at the top level of this repository contains the full
copyright notices and license terms. -->
<tryton>
<data grouped="1">
<!-- stock.location.state -->
<record model="ir.message" id="msg_stock_location_state_date_location_uniq">
<field name="text">Combination of Date and Location must be unique.</field>
</record>
</data>
</tryton>

View File

@ -11,3 +11,4 @@ extras_depend:
xml:
location.xml
message.xml