summaryrefslogtreecommitdiff
path: root/indoteknik_custom/models
diff options
context:
space:
mode:
authorAzka Nathan <darizkyfaz@gmail.com>2024-07-09 09:52:51 +0700
committerAzka Nathan <darizkyfaz@gmail.com>2024-07-09 09:52:51 +0700
commit22d34a07dc8755158f0c85b15d60e348deda0fc2 (patch)
tree978b7656c82e8c6027cad3b92102262911dd60dc /indoteknik_custom/models
parentc00744390dbd913a2be027be8ec3b9739c927a55 (diff)
sale order line reject abl
Diffstat (limited to 'indoteknik_custom/models')
-rwxr-xr-xindoteknik_custom/models/__init__.py1
-rwxr-xr-xindoteknik_custom/models/sale_order.py1
-rw-r--r--indoteknik_custom/models/sales_order_reject.py15
3 files changed, 17 insertions, 0 deletions
diff --git a/indoteknik_custom/models/__init__.py b/indoteknik_custom/models/__init__.py
index 10f4acee..4b8716fa 100755
--- a/indoteknik_custom/models/__init__.py
+++ b/indoteknik_custom/models/__init__.py
@@ -121,3 +121,4 @@ from . import logbook_bill
from . import report_logbook_bill
from . import sale_order_multi_uangmuka_penjualan
from . import shipment_group
+from . import sales_order_reject
diff --git a/indoteknik_custom/models/sale_order.py b/indoteknik_custom/models/sale_order.py
index 0d28e677..4a40bccc 100755
--- a/indoteknik_custom/models/sale_order.py
+++ b/indoteknik_custom/models/sale_order.py
@@ -11,6 +11,7 @@ class SaleOrder(models.Model):
_inherit = "sale.order"
fullfillment_line = fields.One2many('sales.order.fullfillment', 'sales_order_id', string='Fullfillment')
+ reject_line = fields.One2many('sales.order.reject', 'sale_order_id', string='Reject Lines')
order_sales_match_line = fields.One2many('sales.order.purchase.match', 'sales_order_id', string='Purchase Match Lines', states={'cancel': [('readonly', True)], 'done': [('readonly', True)]}, copy=True)
total_margin = fields.Float('Total Margin', compute='_compute_total_margin', help="Total Margin in Sales Order Header")
total_percent_margin = fields.Float('Total Percent Margin', compute='_compute_total_percent_margin', help="Total % Margin in Sales Order Header")
diff --git a/indoteknik_custom/models/sales_order_reject.py b/indoteknik_custom/models/sales_order_reject.py
new file mode 100644
index 00000000..9983c64e
--- /dev/null
+++ b/indoteknik_custom/models/sales_order_reject.py
@@ -0,0 +1,15 @@
+from odoo import fields, models, api, _
+from odoo.exceptions import AccessError, UserError, ValidationError
+from odoo.tools import DEFAULT_SERVER_DATETIME_FORMAT
+import logging
+
+_logger = logging.getLogger(__name__)
+
+
+class SalesOrderReject(models.Model):
+ _name = 'sales.order.reject'
+
+ sale_order_id = fields.Many2one('sale.order', string='Sale Order')
+ product_id = fields.Many2one('product.product', string='Product')
+ qty_reject = fields.Float(string='Qty')
+ reason_reject = fields.Char(string='Reason Reject')