summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAzka Nathan <darizkyfaz@gmail.com>2024-10-10 09:45:23 +0700
committerAzka Nathan <darizkyfaz@gmail.com>2024-10-10 09:45:23 +0700
commit7153f047a6c9e98a1a016a6e08379f495071c9a1 (patch)
tree268155d13e4c7a9e004354997f54ea7df6c2745b
parent98772cc23d66c5a624600ba2716cc790094efc98 (diff)
add approve_by po
-rwxr-xr-xindoteknik_custom/models/purchase_order.py2
-rwxr-xr-xindoteknik_custom/views/purchase_order.xml1
2 files changed, 3 insertions, 0 deletions
diff --git a/indoteknik_custom/models/purchase_order.py b/indoteknik_custom/models/purchase_order.py
index 08408506..12eeb5c4 100755
--- a/indoteknik_custom/models/purchase_order.py
+++ b/indoteknik_custom/models/purchase_order.py
@@ -70,6 +70,7 @@ class PurchaseOrder(models.Model):
bills_dp_id = fields.Many2one('account.move', string='Bills DP')
grand_total = fields.Monetary(string='Grand Total', help='Amount total + amount delivery', compute='_compute_grand_total')
total_margin_match = fields.Float(string='Total Margin Match', compute='_compute_total_margin_match')
+ approve_by = fields.Many2one('res.users', string='Approve By')
def _compute_total_margin_match(self):
for purchase in self:
@@ -541,6 +542,7 @@ class PurchaseOrder(models.Model):
self.po_status = 'menunggu'
self.calculate_line_no()
+ self.approve_by = self.env.user.id
# override date planned added with two days
leadtime = self.partner_id.leadtime
diff --git a/indoteknik_custom/views/purchase_order.xml b/indoteknik_custom/views/purchase_order.xml
index 346100ae..1702db5d 100755
--- a/indoteknik_custom/views/purchase_order.xml
+++ b/indoteknik_custom/views/purchase_order.xml
@@ -41,6 +41,7 @@
<field name="incoterm_id" position="after">
<field name="amount_total_without_service"/>
<field name="delivery_amt"/>
+ <field name="approve_by"/>
</field>
<field name="currency_id" position="after">
<field name="summary_qty_po"/>