Skip to content

Commit ea3a8b1

Browse files
authored
Merge pull request #65 from gisce/increase_powersms_templates_name_size
Increase powersms templates size name
2 parents ef1aaec + 51a50ef commit ea3a8b1

File tree

2 files changed

+24
-1
lines changed

2 files changed

+24
-1
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# -*- coding: utf-8 -*-
2+
import logging
3+
import pooler
4+
from oopgrade.oopgrade import add_columns, column_exists
5+
6+
7+
def up(cursor, installed_version):
8+
if not installed_version:
9+
return
10+
11+
logger = logging.getLogger('openerp.migration')
12+
13+
logger.info('Increasing size of powersms.templates name from 100 to 200')
14+
cursor.execute('ALTER TABLE powersms_templates ALTER COLUMN name type varchar(200)')
15+
logger.info('Migration successfully completed')
16+
17+
18+
19+
def down(cursor, installed_version):
20+
pass
21+
22+
23+
migrate = up

powersms/powersms_templates.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ def create_report(self, cursor, user, template, record_ids, context=None):
172172
return _result, _format
173173

174174
_columns = {
175-
"name": fields.char("Name of Template", size=100, required=True),
175+
"name": fields.char("Name of Template", size=200, required=True),
176176
"object_name": fields.many2one("ir.model", "Model"),
177177
"def_body_text": fields.text(
178178
"Standard Body (Text)", help="The text of the sms.", translate=True

0 commit comments

Comments
 (0)