summaryrefslogtreecommitdiff
path: root/indoteknik_custom/models
diff options
context:
space:
mode:
Diffstat (limited to 'indoteknik_custom/models')
-rwxr-xr-xindoteknik_custom/models/purchase_order.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/indoteknik_custom/models/purchase_order.py b/indoteknik_custom/models/purchase_order.py
index 0696dd9f..27f1aebd 100755
--- a/indoteknik_custom/models/purchase_order.py
+++ b/indoteknik_custom/models/purchase_order.py
@@ -89,6 +89,20 @@ class PurchaseOrder(models.Model):
store_name = fields.Char(string='Nama Toko')
purchase_order_count = fields.Integer('Purchase Order Count', related='partner_id.purchase_order_count')
+ def action_view_journal_uangmuka(self):
+ self.ensure_one()
+ if not self.move_id:
+ raise UserError("Journal Uang Muka belum tersedia.")
+
+ return {
+ 'type': 'ir.actions.act_window',
+ 'name': 'Journal Entry',
+ 'res_model': 'account.move',
+ 'res_id': self.move_id.id,
+ 'view_mode': 'form',
+ 'target': 'current',
+ }
+
# cek payment term
def _check_payment_term(self):
_logger.info("Check Payment Term Terpanggil")