summaryrefslogtreecommitdiff
path: root/indoteknik_custom
diff options
context:
space:
mode:
authorIT Fixcomart <it@fixcomart.co.id>2025-07-28 10:44:32 +0000
committerIT Fixcomart <it@fixcomart.co.id>2025-07-28 10:44:32 +0000
commit7e03f052ad9217c165dca5a330f56e2a9e1a1bc1 (patch)
treee665025d571ed6e18a29be8a60a22f13194e22c9 /indoteknik_custom
parent3df417568e6efe97b9c8e3d2752e13f584802d71 (diff)
parentd5eb5c9139f016498cc70d6f241b8597b0b4b06b (diff)
Merged in is_discweb_so_line (pull request #369)
Is discweb so line
Diffstat (limited to 'indoteknik_custom')
-rw-r--r--indoteknik_custom/models/sale_order_line.py7
-rwxr-xr-xindoteknik_custom/views/sale_order.xml1
2 files changed, 8 insertions, 0 deletions
diff --git a/indoteknik_custom/models/sale_order_line.py b/indoteknik_custom/models/sale_order_line.py
index 5e9fc362..64b9f9bc 100644
--- a/indoteknik_custom/models/sale_order_line.py
+++ b/indoteknik_custom/models/sale_order_line.py
@@ -1,6 +1,10 @@
from odoo import fields, models, api, _
from odoo.exceptions import UserError
from datetime import datetime, timedelta
+import logging
+from odoo.tools.float_utils import float_compare
+
+_logger = logging.getLogger(__name__)
class SaleOrderLine(models.Model):
@@ -49,6 +53,9 @@ class SaleOrderLine(models.Model):
qty_free_bu = fields.Float(string='Free BU', compute='_get_qty_free_bandengan')
desc_updatable = fields.Boolean(string='desc boolean', default=True, compute='_get_desc_updatable')
+ is_has_disc = fields.Boolean('Flash Sale', default=False)
+
+
def _get_outgoing_incoming_moves(self):
outgoing_moves = self.env['stock.move']
incoming_moves = self.env['stock.move']
diff --git a/indoteknik_custom/views/sale_order.xml b/indoteknik_custom/views/sale_order.xml
index c1f1fe61..79ac3ed9 100755
--- a/indoteknik_custom/views/sale_order.xml
+++ b/indoteknik_custom/views/sale_order.xml
@@ -292,6 +292,7 @@
<field name="weight" optional="hide"/>
<field name="amount_voucher_disc" string="Voucher" readonly="1" optional="hide"/>
<field name="order_promotion_id" string="Promotion" readonly="1" optional="hide"/>
+ <field name="is_has_disc" string="Flash Sale Item?" readonly="1" optional="hide"/>
</xpath>
<xpath
expr="//form/sheet/notebook/page/field[@name='order_line']/tree/field[@name='product_id']"