def migrate(cr, version): pool = pooler.get_pool(cr.dbname) openupgrade.set_defaults( cr, pool, {'res.partner': [('active', None)]}, force=True) openupgrade.set_defaults( cr, pool, {'res.partner': [('active', None)]}, force=True, use_orm=True)
def migrate(env, version): openupgrade.set_defaults(env.cr, env, {'res.partner': [('active', None)]}, force=True) openupgrade.set_defaults(env.cr, env, {'res.partner': [('active', None)]}, force=True, use_orm=True)
def default_training_participant(env): pool = registry(env.cr.dbname) val = env.ref("hr_employee_training.hr_training_participant_type_default") openupgrade.set_defaults( env.cr, pool, {"hr.training_partisipant": [("type_id", val.id)]}, )
def migrate(env, version): pool = RegistryManager.get(env.cr.dbname) openupgrade.set_defaults( env.cr, pool, {'website': [('cdn_filters', None)]}, use_orm=True, ) openupgrade.load_data( env.cr, 'website', 'migrations/9.0.1.0/noupdate_changes.xml', )
def migrate(cr, version): pool = pooler.get_pool(cr.dbname) openupgrade.set_defaults(cr, pool, {'res.partner': [('active', None)]}, force=True) openupgrade.set_defaults(cr, pool, {'res.partner': [('active', None)]}, force=True, use_orm=True)
def set_default_values(env): """ Update with default values for new required fields """ openupgrade.set_defaults( env.cr, env, {'pos.config': [ ('customer_facing_display_html', None), ]}, use_orm=True, )
def migrate(cr, version): pool = pooler.get_pool(cr.dbname) # Set the default for res.partner 'active' column to True instead of 1 # which breaks the SQL method of set_defaults pool['res.partner']._defaults['active'] = lambda *args: True openupgrade.set_defaults( cr, pool, {'res.partner': [('active', None)]}, force=True) openupgrade.set_defaults( cr, pool, {'res.partner': [('active', None)]}, force=True, use_orm=True)
def set_default_values(env): """ Update with default values for new required fields """ openupgrade.set_defaults( env.cr, env, { 'project.task.type': [ ('legend_blocked', None), ('legend_done', None), ('legend_normal', None) ] }, )
def migrate(cr, version): pool = pooler.get_pool(cr.dbname) # Set the default for res.partner 'active' column to True instead of 1 # which breaks the SQL method of set_defaults pool['res.partner']._defaults['active'] = lambda *args: True openupgrade.set_defaults(cr, pool, {'res.partner': [('active', None)]}, force=True) openupgrade.set_defaults(cr, pool, {'res.partner': [('active', None)]}, force=True, use_orm=True)
def migrate(cr, version): pool = pooler.get_pool(cr.dbname) openupgrade_80.set_message_last_post(cr, SUPERUSER_ID, pool, ['purchase.requisition']) openupgrade.move_field_m2o( cr, pool, 'product.product', openupgrade.get_legacy_name('purchase_requisition'), 'product_tmpl_id', 'product.template', 'purchase_requisition') _copy_purchase_order_line_quantity_as_bid(cr) openupgrade.set_defaults(cr, pool, { 'purchase.requisition': [ ('picking_type_id', None), ], }) _create_workflows_for_requisitions(cr) _fill_procurement_id_from_requisition(cr) openupgrade.load_data(cr, 'purchase_requisition', 'migrations/8.0.0.1/noupdate_changes.xml')
def migrate(cr, version): pool = pooler.get_pool(cr.dbname) openupgrade.set_defaults( cr, pool, {'res.partner': [('active', None)]}, force=True) openupgrade.set_defaults( cr, pool, {'res.partner': [('active', None)]}, force=True, use_orm=True) env = api.Environment(cr, SUPERUSER_ID, {}) openupgrade.set_defaults( cr, env, {'res.partner': [('active', None)]}, force=True) openupgrade.set_defaults( cr, env, {'res.partner': [('active', None)]}, force=True, use_orm=True)
def migrate(env, version): openupgrade.set_defaults( env.cr, env, {'res.partner': [('active', None)]}, force=True) openupgrade.set_defaults( env.cr, env, {'res.partner': [('active', None)]}, force=True, use_orm=True)
def migrate(env, version): openupgrade.set_defaults(env.cr, env.registry, column_defaults) update_barcodes_nomenclatures(env) openupgrade.load_data(env.cr, 'point_of_sale', 'migrations/9.0.1.0.1/noupdate_changes.xml') openupgrade_90.convert_binary_field_to_attachment(env, attachment_fields)
def migrate(cr, version): registry = RegistryManager.get(cr.dbname) openupgrade.set_defaults(cr, registry, column_defaults, force=False)
def migrate(cr, version): registry = RegistryManager.get(cr.dbname) openupgrade.set_defaults(cr, registry, column_defaults, force=False) openupgrade.load_data(cr, 'project_issue', 'migrations/9.0.1.0/noupdate_changes.xml')