diff options
| author | FIN-IT_AndriFP <andrifebriyadiputra@gmail.com> | 2025-12-12 13:48:45 +0700 |
|---|---|---|
| committer | FIN-IT_AndriFP <andrifebriyadiputra@gmail.com> | 2025-12-12 13:48:45 +0700 |
| commit | 21d01b83204677e3cf8d355b6198290b6dbb9d52 (patch) | |
| tree | 6bf82db66666a3ebe56db44326189c7ebfc47f77 /indoteknik_custom/models/tukar_guling.py | |
| parent | b615e3bc69910a6a495a72dc49309a80295486a0 (diff) | |
| parent | 8996a5b127f4bb3bf8926d23b3e79d25de8ddc76 (diff) | |
Merge branch 'odoo-backup' of https://bitbucket.org/altafixco/indoteknik-addons into cr_renca_find
Diffstat (limited to 'indoteknik_custom/models/tukar_guling.py')
| -rw-r--r-- | indoteknik_custom/models/tukar_guling.py | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/indoteknik_custom/models/tukar_guling.py b/indoteknik_custom/models/tukar_guling.py index f31c68d0..9bcb0988 100644 --- a/indoteknik_custom/models/tukar_guling.py +++ b/indoteknik_custom/models/tukar_guling.py @@ -87,6 +87,7 @@ class TukarGuling(models.Model): is_has_invoice = fields.Boolean('Has Invoice?', compute='_compute_is_has_invoice', readonly=True, default=False) invoice_id = fields.Many2many('account.move', string='Invoice Ref', readonly=True) + rev_tukar_guling = fields.Boolean('SO Direvisi?', default=False, tracking=3) @api.depends('origin', 'operations') def _compute_origin_so(self): @@ -808,7 +809,8 @@ class TukarGuling(models.Model): srt_picking.write({ 'group_id': bu_out.group_id.id, 'tukar_guling_id': record.id, - 'sale_order': record.origin + 'sale_order': record.origin, + 'note': record.notes, }) created_returns.append(srt_picking) _logger.info(f"✅ SRT created: {srt_picking.name}") @@ -868,7 +870,11 @@ class TukarGuling(models.Model): ort_picking.write({ 'group_id': bu_out.group_id.id, 'tukar_guling_id': record.id, - 'sale_order': record.origin + 'sale_order': record.origin, + 'sj_return_date': bu_out.sj_return_date, + 'driver_arrival_date': bu_out.driver_arrival_date, + 'delivery_date': bu_out.delivery_date, + 'note': record.notes, }) created_returns.append(ort_picking) @@ -913,7 +919,8 @@ class TukarGuling(models.Model): new_pick.write({ 'group_id': bu_out.group_id.id, 'tukar_guling_id': record.id, - 'sale_order': record.origin + 'sale_order': record.origin, + 'note': record.notes, }) new_pick.action_assign() new_pick.action_confirm() @@ -952,7 +959,11 @@ class TukarGuling(models.Model): new_out.write({ 'group_id': bu_out.group_id.id, 'tukar_guling_id': record.id, - 'sale_order': record.origin + 'sale_order': record.origin, + 'note': record.notes, + 'sj_return_date': bu_out.sj_return_date if record.rev_tukar_guling else False, + 'driver_arrival_date': bu_out.driver_arrival_date if record.rev_tukar_guling else False, + 'delivery_date': bu_out.delivery_date if record.rev_tukar_guling else False, }) created_returns.append(new_out) _logger.info(f"✅ BU/OUT Baru dari SRT created: {new_out.name}") |
