summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRafi Zadanly <zadanlyr@gmail.com>2024-02-28 14:47:00 +0700
committerRafi Zadanly <zadanlyr@gmail.com>2024-02-28 14:47:00 +0700
commit85493aa6f97429a561ebf0ff1fa6baa3da9bd50c (patch)
tree0770cec53cec29a0807ed13fd6dcb8ab216c0abc
parent46a7cc5601ceab2a7a6cdf4d74e0fa26ce13ab8a (diff)
Add inherit stock quant
-rwxr-xr-xindoteknik_custom/__manifest__.py1
-rwxr-xr-xindoteknik_custom/models/__init__.py1
-rw-r--r--indoteknik_custom/models/stock_quant.py8
-rw-r--r--indoteknik_custom/views/stock_quant.xml15
4 files changed, 16 insertions, 9 deletions
diff --git a/indoteknik_custom/__manifest__.py b/indoteknik_custom/__manifest__.py
index dc03d138..30e8e176 100755
--- a/indoteknik_custom/__manifest__.py
+++ b/indoteknik_custom/__manifest__.py
@@ -115,6 +115,7 @@
'views/role_permission/ir_model_access.xml',
'views/role_permission/res_groups.xml',
'views/cust_commision.xml',
+ 'views/stock_quant.xml',
'report/report.xml',
'report/report_banner_banner.xml',
'report/report_banner_banner2.xml',
diff --git a/indoteknik_custom/models/__init__.py b/indoteknik_custom/models/__init__.py
index f8ff34d9..7c5e46e6 100755
--- a/indoteknik_custom/models/__init__.py
+++ b/indoteknik_custom/models/__init__.py
@@ -97,7 +97,6 @@ from . import sale_advance_payment_inv
from . import purchase_order_multi_update
from . import invoice_reklas_penjualan
from . import purchase_order_multi_confirm
-from . import stock_quant
from . import po_multi_cancel
from . import logbook_sj
from . import report_logbook_sj
diff --git a/indoteknik_custom/models/stock_quant.py b/indoteknik_custom/models/stock_quant.py
deleted file mode 100644
index 9affcf4b..00000000
--- a/indoteknik_custom/models/stock_quant.py
+++ /dev/null
@@ -1,8 +0,0 @@
-import logging
-
-from odoo import _, api, fields, models
-from odoo.exceptions import UserError
-class StockQuant(models.Model):
- _inherit = 'stock.quant'
-
- \ No newline at end of file
diff --git a/indoteknik_custom/views/stock_quant.xml b/indoteknik_custom/views/stock_quant.xml
new file mode 100644
index 00000000..107f75f3
--- /dev/null
+++ b/indoteknik_custom/views/stock_quant.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0"?>
+<odoo>
+ <data>
+ <record id="stock_view_stock_quant_tree_editable_inherited" model="ir.ui.view">
+ <field name="name">stock.view_stock_quant_tree_editable_inherited</field>
+ <field name="model">stock.quant</field>
+ <field name="inherit_id" ref="stock.view_stock_quant_tree_editable"/>
+ <field name="arch" type="xml">
+ <field name="inventory_quantity" position="after">
+ <field name="reserved_quantity" readonly="1" />
+ </field>
+ </field>
+ </record>
+ </data>
+</odoo>