summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xindoteknik_custom/models/sale_order.py5
-rwxr-xr-xindoteknik_custom/views/sale_order.xml4
2 files changed, 8 insertions, 1 deletions
diff --git a/indoteknik_custom/models/sale_order.py b/indoteknik_custom/models/sale_order.py
index 14b66d87..2ed4046f 100755
--- a/indoteknik_custom/models/sale_order.py
+++ b/indoteknik_custom/models/sale_order.py
@@ -398,7 +398,10 @@ class SaleOrder(models.Model):
compute="_compute_partner_is_cbd_locked"
)
internal_notes_contact = fields.Text(related='partner_id.comment', string="Internal Notes", readonly=True, help="Internal Notes dari contact utama customer.")
- is_so_fiktif = fields.Boolean('SO Fiktif?', tracking=3)
+ is_so_fiktif = fields.Boolean('SO Fiktif?', tracking=3)
+ team_id = fields.Many2one(tracking=True)
+
+
def action_set_shipping_id(self):
for rec in self:
diff --git a/indoteknik_custom/views/sale_order.xml b/indoteknik_custom/views/sale_order.xml
index 9495c7ce..23fbe155 100755
--- a/indoteknik_custom/views/sale_order.xml
+++ b/indoteknik_custom/views/sale_order.xml
@@ -147,6 +147,10 @@
<field name="helper_by_id" readonly="1" />
<field name="compute_fullfillment" invisible="1" />
</field>
+ <xpath expr="//field[@name='team_id']" position="attributes">
+ <attribute name="attrs">{'readonly': [('state', 'in', ['sale', 'done'])]}</attribute>
+ </xpath>
+
<field name="tag_ids" position="after">
<!-- <field name="eta_date_start"/> -->
<t t-esc="' to '"/>