diff options
| author | Miqdad <ahmadmiqdad27@gmail.com> | 2025-05-08 07:12:04 +0700 |
|---|---|---|
| committer | Miqdad <ahmadmiqdad27@gmail.com> | 2025-05-08 07:12:04 +0700 |
| commit | 667ae638f2e9ec9c699037e8f2dac9f53199bc07 (patch) | |
| tree | 10633ebc43ec323cea0a6cd71fbd50fdf7308e97 /indoteknik_custom/models/stock_picking.py | |
| parent | a045b3dc711fb049a78db0e65088a561e0fd9c4a (diff) | |
| parent | 5bd86996e2af3eb9ce1167a3229cb290cca22e29 (diff) | |
Merge branch 'odoo-backup' of https://bitbucket.org/altafixco/indoteknik-addons into feat_voucher_category
Diffstat (limited to 'indoteknik_custom/models/stock_picking.py')
| -rw-r--r-- | indoteknik_custom/models/stock_picking.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/indoteknik_custom/models/stock_picking.py b/indoteknik_custom/models/stock_picking.py index f431d817..d032f99f 100644 --- a/indoteknik_custom/models/stock_picking.py +++ b/indoteknik_custom/models/stock_picking.py @@ -276,6 +276,15 @@ class StockPicking(models.Model): last_update_date_doc_kirim = fields.Datetime(string='Last Update Tanggal Kirim') update_date_doc_kirim_add = fields.Boolean(string='Update Tanggal Kirim Lewat ADD') + @api.constrains('sj_return_date') + def _check_sj_return_date(self): + for record in self: + if not record.driver_arrival_date: + if record.sj_return_date: + raise ValidationError( + _("Anda tidak dapat mengubah Tanggal Pengembalian setelah Tanggal Pengiriman!") + ) + def _check_date_doc_kirim_modification(self): for record in self: if record.last_update_date_doc_kirim and not self.env.context.get('from_button_approve'): |
