| 1 | # -*- coding: utf-8 -*- |
| 2 | |
| 3 | from . import models |
| 4 | |
| 5 | def _create_picking_seq(env): |
| 6 | ptypes = env['stock.picking.type'].search([('code', '=', 'outgoing'), ('warehouse_id', '!=', False)]) |
| 7 | for ptype in ptypes: |
| 8 | wh = ptype.warehouse_id |
| 9 | ptype.l10n_it_ddt_sequence_id = env['ir.sequence'].create({ |
| 10 | 'name': wh.name + ' ' + ' Sequence ' + ' ' + ptype.sequence_code, |
| 11 | 'prefix': wh.code + '/' + ptype.sequence_code + '/DDT', 'padding': 5, |
| 12 | 'company_id': wh.company_id.id, |
| 13 | 'implementation': 'no_gap', |
| 14 | }).id |