summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiqdad <ahmadmiqdad27@gmail.com>2025-08-06 12:56:35 +0700
committerMiqdad <ahmadmiqdad27@gmail.com>2025-08-06 12:56:35 +0700
commitab11c9455c6e125195ec5004adfd855058d46f5f (patch)
treec74232118cbc0e259f184fea8a6937676669c9fc
parentccbb64638373bb113cfbdfdda1865cf8bda1ebb3 (diff)
<miqdad> fix error singleton
-rw-r--r--indoteknik_custom/models/tukar_guling.py2
-rw-r--r--indoteknik_custom/models/tukar_guling_po.py2
-rw-r--r--indoteknik_custom/views/tukar_guling.xml2
-rw-r--r--indoteknik_custom/views/tukar_guling_po.xml3
4 files changed, 5 insertions, 4 deletions
diff --git a/indoteknik_custom/models/tukar_guling.py b/indoteknik_custom/models/tukar_guling.py
index 3091acce..8de5b671 100644
--- a/indoteknik_custom/models/tukar_guling.py
+++ b/indoteknik_custom/models/tukar_guling.py
@@ -81,7 +81,7 @@ class TukarGuling(models.Model):
is_has_invoice = fields.Boolean('Has Invoice?', compute='_compute_is_has_invoice', readonly=True, default=False)
- invoice_id = fields.Many2one('account.move', string='Invoice Ref', readonly=True)
+ invoice_id = fields.Many2many('account.move', string='Invoice Ref', readonly=True)
@api.depends('origin')
def _compute_is_has_invoice(self):
diff --git a/indoteknik_custom/models/tukar_guling_po.py b/indoteknik_custom/models/tukar_guling_po.py
index 38afaac6..5d444472 100644
--- a/indoteknik_custom/models/tukar_guling_po.py
+++ b/indoteknik_custom/models/tukar_guling_po.py
@@ -61,7 +61,7 @@ class TukarGulingPO(models.Model):
is_has_bill = fields.Boolean('Has Bill?', compute='_compute_is_has_bill', readonly=True, default=False)
- bill_id = fields.Many2one('account.move', string='Bill Ref', readonly=True)
+ bill_id = fields.Many2many('account.move', string='Bill Ref', readonly=True)
@api.depends('origin')
def _compute_is_has_bill(self):
diff --git a/indoteknik_custom/views/tukar_guling.xml b/indoteknik_custom/views/tukar_guling.xml
index 88e5b883..20aa2eef 100644
--- a/indoteknik_custom/views/tukar_guling.xml
+++ b/indoteknik_custom/views/tukar_guling.xml
@@ -85,7 +85,7 @@
attrs="{'readonly': [('state', 'not in', 'draft')]}"/>
<field name="origin" readonly="1"/>
<field name="is_has_invoice" readonly="1"/>
- <field name="invoice_id" readonly="1"/>
+ <field name="invoice_id" readonly="1" widget="many2many_tags"/>
</group>
<group>
<field name="val_inv_opt" attrs="{'invisible': [('is_has_invoice', '=', False)]}"/>
diff --git a/indoteknik_custom/views/tukar_guling_po.xml b/indoteknik_custom/views/tukar_guling_po.xml
index d3c41405..bc696a3d 100644
--- a/indoteknik_custom/views/tukar_guling_po.xml
+++ b/indoteknik_custom/views/tukar_guling_po.xml
@@ -91,7 +91,8 @@
}"/>
<field name="origin" readonly="1"/>
<field name="is_has_bill" readonly="1"/>
- <field name="bill_id" readonly="1"/>
+<!-- <field name="bill_id" readonly="1" />-->
+ <field name="bill_id" readonly="1" widget="many2many_tags"/>
<!-- <field name="origin_so" readonly="1"/>-->
</group>
<group>