diff options
| author | Miqdad <ahmadmiqdad27@gmail.com> | 2025-06-26 15:06:59 +0700 |
|---|---|---|
| committer | Miqdad <ahmadmiqdad27@gmail.com> | 2025-06-26 15:06:59 +0700 |
| commit | 7ac0e952f1ce4be4bbe3c374a646a7b106746581 (patch) | |
| tree | db9e81b1441fc3aede1ce008fc574ff7a041512f | |
| parent | 215dffae18b05fd3ab6df25b5d414f302f986b65 (diff) | |
<miqdad> jago
| -rw-r--r-- | indoteknik_custom/models/tukar_guling.py | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/indoteknik_custom/models/tukar_guling.py b/indoteknik_custom/models/tukar_guling.py index 681090f0..77538c91 100644 --- a/indoteknik_custom/models/tukar_guling.py +++ b/indoteknik_custom/models/tukar_guling.py @@ -24,8 +24,8 @@ class TukarGuling(models.Model): name = fields.Char('Number', required=True, copy=False, readonly=True, default='New') date = fields.Datetime('Date', default=fields.Datetime.now, required=True) operations = fields.Many2one('stock.picking', 'Operations', - domain=[('picking_type_id.code', '=', 'outgoing')], help='Nomor BU/Out atau BU/Pick') - spesific_operations = fields.Many2one('stock.picking', 'Spesific Operations', domain = [('origin', '=', origin), ('state', '=', 'done')]) + domain=[('picking_type_id.sequence_code', 'in', ['OUT', 'PICK']), + ('state', '=', 'done')], help='Nomor BU/Out atau BU/Pick') ba_num = fields.Text('Nomor BA') notes = fields.Text('Notes') return_type = fields.Selection(String='Return Type', selection=[ @@ -45,10 +45,6 @@ class TukarGuling(models.Model): @api.onchange('operations') def _onchange_operations(self): """Auto-populate lines ketika operations dipilih""" - if self.origin: - return {'domain': { - 'specific_transfers': [('origin', '=', self.origin), ('state', '=', 'done')] - }} if self.operations: from_return_picking = self.env.context.get('from_return_picking', False) or \ self.env.context.get('default_line_ids', False) |
