diff options
| author | Mqdd <ahmadmiqdad27@gmail.com> | 2026-02-10 18:26:52 +0700 |
|---|---|---|
| committer | Mqdd <ahmadmiqdad27@gmail.com> | 2026-02-10 18:26:52 +0700 |
| commit | dc2baa117413f3140adf99c8a398da3d7637c3d3 (patch) | |
| tree | 08774cd6fc6ce926ec2f10fb0f67c01573df228c | |
| parent | 16f8bd52164e8a0d205a0ffad69d0e3d8aa9e82c (diff) | |
<Miqdad> push
| -rw-r--r-- | indoteknik_custom/models/gudang_service.py | 2 | ||||
| -rw-r--r-- | indoteknik_custom/views/gudang_service.xml | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/indoteknik_custom/models/gudang_service.py b/indoteknik_custom/models/gudang_service.py index 4e3b2c34..4900113f 100644 --- a/indoteknik_custom/models/gudang_service.py +++ b/indoteknik_custom/models/gudang_service.py @@ -157,7 +157,7 @@ class GudangService(models.Model): ('res_model', '=', 'gudang.service'), ]) activities.unlink() - if rec.state == 'done': + if rec.state == 'delivered_to_cust': raise UserError("You cannot cancel a done record") if not rec.cancel_reason: raise UserError("Cancel Reason must be filled") diff --git a/indoteknik_custom/views/gudang_service.xml b/indoteknik_custom/views/gudang_service.xml index 6abdcc8b..e5cc94c4 100644 --- a/indoteknik_custom/views/gudang_service.xml +++ b/indoteknik_custom/views/gudang_service.xml @@ -56,10 +56,10 @@ <field name="remaining_date"/> <field name="schedule_date" attrs="{'readonly': [('state', 'not in', ['draft'])]}"/> <field name="start_date" readonly="1"/> - <field name="done_date" attrs="{'invisible': [('state', 'not in', ['done'])]}"/> + <field name="done_date" attrs="{'invisible': [('state', 'not in', ['delivered_to_cust'])]}"/> <field name="create_uid"/> <field name="cancel_reason" - attrs="{'invisible': [('state', 'in', ['done', 'draft'])]}"/> + attrs="{'invisible': [('state', 'in', ['delivered_to_cust', 'draft'])]}"/> </group> <notebook> <page string="Product Lines" name="product_lines"> |
