-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #168 from gisce/61360_filter_record_attach_category
Permitir adjuntar documentos con categorias concretas
- Loading branch information
Showing
5 changed files
with
69 additions
and
43 deletions.
There are no files selected for viewing
37 changes: 37 additions & 0 deletions
37
migrations/5.0.24.9.0/post-0003_init_attach_categ_field.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# -*- coding: utf-8 -*- | ||
import logging | ||
import pooler | ||
|
||
from tools import config | ||
from oopgrade.oopgrade import load_data_records | ||
|
||
|
||
def up(cursor, installed_version): | ||
if not installed_version: | ||
return | ||
if config.updating_all: | ||
return | ||
logger = logging.getLogger('openerp.migration') | ||
|
||
logger.info("Creating pooler") | ||
pool = pooler.get_pool(cursor.dbname) | ||
|
||
logger.info("Creating table: giscedata.polissa") | ||
pool.get("poweremail.templates")._auto_init(cursor, context={'module': 'poweremail'}) | ||
logger.info("Table created succesfully.") | ||
|
||
logger.info("Updating XMLs") | ||
list_of_records = [ | ||
"poweremail_template_form", | ||
] | ||
load_data_records( | ||
cursor, 'poweremail', 'poweremail_template_view.xml', list_of_records, mode='update' | ||
) | ||
logger.info("XMLs succesfully updated.") | ||
|
||
|
||
def down(cursor, installed_version): | ||
pass | ||
|
||
|
||
migrate = up |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters