summaryrefslogtreecommitdiff
path: root/indoteknik_custom/models
diff options
context:
space:
mode:
authorit-fixcomart <it@fixcomart.co.id>2024-12-11 11:51:06 +0700
committerit-fixcomart <it@fixcomart.co.id>2024-12-11 11:51:06 +0700
commit0391f0df5d30cd81b4281c3d5082bf96671bd97b (patch)
tree687b99356f5ad4ab6699cfde8684560cb0e3c7fb /indoteknik_custom/models
parent31374ed669121ba6c8ec401f82ad0bfedf07a6d6 (diff)
<iman> update code
Diffstat (limited to 'indoteknik_custom/models')
-rw-r--r--indoteknik_custom/models/user_pengajuan_tempo_request.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/indoteknik_custom/models/user_pengajuan_tempo_request.py b/indoteknik_custom/models/user_pengajuan_tempo_request.py
index 832c21af..452e4763 100644
--- a/indoteknik_custom/models/user_pengajuan_tempo_request.py
+++ b/indoteknik_custom/models/user_pengajuan_tempo_request.py
@@ -46,8 +46,8 @@ class UserPengajuanTempoRequest(models.Model):
user_id = fields.Many2one('res.partner', string='User')
user_company_id = fields.Many2one('res.partner', string='Company')
pengajuan_tempo_id = fields.Many2one('user.pengajuan.tempo', string='Form Tempo')
- tempo_duration = fields.Many2one('account.payment.term', string='Durasi Tempo', tracking=3, )
- tempo_limit = fields.Char(string='Limit Tempo', tracking=3)
+ tempo_duration = fields.Many2one('account.payment.term', string='Durasi Tempo', tracking=3, domain=[('id', 'in', [24, 25, 29, 32])])
+ tempo_limit = fields.Integer(string='Limit Tempo', tracking=3)
state_tempo = fields.Selection([
('draft', 'Pengajuan Tempo'),
('approval_sales', 'Approved by Sales Manager'),
@@ -70,7 +70,7 @@ class UserPengajuanTempoRequest(models.Model):
account_number_tempo = fields.Char(string="Nomor Rekening Bank", related='pengajuan_tempo_id.account_number_tempo', store=True, tracking=True, readonly=False)
website_tempo = fields.Char(string='Website', related='pengajuan_tempo_id.website_tempo', store=True, tracking=True, readonly=False)
estimasi_tempo = fields.Char(string='Estimasi Pembelian Pertahun', related='pengajuan_tempo_id.estimasi_tempo', store=True, tracking=True, readonly=False)
- tempo_duration_origin = fields.Many2one('account.payment.term', string='Durasi Tempo', related='pengajuan_tempo_id.tempo_duration', store=True, tracking=True, readonly=False)
+ tempo_duration_origin = fields.Many2one('account.payment.term', string='Durasi Tempo', related='pengajuan_tempo_id.tempo_duration', store=True, tracking=True, readonly=False, domain=[('id', 'in', [24, 25, 29, 32])])
tempo_limit_origin = fields.Char(string='Limit Tempo', related='pengajuan_tempo_id.tempo_limit' , store=True, tracking=True, readonly=False)
category_produk_ids = fields.Many2many('product.public.category', string='Kategori Produk yang Digunakan', related='pengajuan_tempo_id.category_produk_ids', readonly=False)
@@ -287,7 +287,6 @@ class UserPengajuanTempoRequest(models.Model):
for tempo in self:
if tempo.env.user.id not in (7, 377, 12182):
raise UserError("Limit tempo hanya bisa diubah oleh Sales Manager atau Direktur")
-
def button_approve(self):
for tempo in self:
if not self.tempo_limit: