diff options
| author | Indoteknik . <it@fixcomart.co.id> | 2025-09-02 12:00:26 +0700 |
|---|---|---|
| committer | Indoteknik . <it@fixcomart.co.id> | 2025-09-02 12:00:26 +0700 |
| commit | 70dfadc9aa8274e8f9aafa4ec594af0b5a37343b (patch) | |
| tree | 13b28cb31f28d4d716f31e224deea59fc5b23097 | |
| parent | ed459eb048e8e14075134ead0cb80d5da864af53 (diff) | |
(andri) add tracking payment terms dan fix notif ketika membuat SO
| -rw-r--r-- | indoteknik_custom/models/res_partner.py | 14 | ||||
| -rwxr-xr-x | indoteknik_custom/views/sale_order.xml | 2 |
2 files changed, 8 insertions, 8 deletions
diff --git a/indoteknik_custom/models/res_partner.py b/indoteknik_custom/models/res_partner.py index 017be730..80fe643b 100644 --- a/indoteknik_custom/models/res_partner.py +++ b/indoteknik_custom/models/res_partner.py @@ -184,12 +184,12 @@ class ResPartner(models.Model): is_cbd_locked = fields.Boolean("Locked to CBD?", default=False, tracking=True, help="Jika dicentang, maka partner ini terkunci pada payment term CBD karena memiliki invoice yang sudah jatuh tempo lebih dari 30 hari.") # centang manual is_cbd_locked jika payment term diubah ke CBD - @api.onchange('is_cbd_locked') - def _onchange_is_cbd_locked(self): - if self.is_cbd_locked: - cbd_term = self.env['account.payment.term'].browse(26) - if cbd_term: - self.property_payment_term_id = cbd_term.id + # @api.onchange('is_cbd_locked') + # def _onchange_is_cbd_locked(self): + # if self.is_cbd_locked: + # cbd_term = self.env['account.payment.term'].browse(26) + # if cbd_term: + # self.property_payment_term_id = cbd_term.id @api.model def _default_payment_term(self): @@ -198,7 +198,7 @@ class ResPartner(models.Model): property_payment_term_id = fields.Many2one( 'account.payment.term', string='Payment Terms', - default=_default_payment_term + default=_default_payment_term, tracking=3 ) @api.depends("street", "street2", "city", "state_id", "country_id", "blok", "nomor", "rt", "rw", "kelurahan_id", diff --git a/indoteknik_custom/views/sale_order.xml b/indoteknik_custom/views/sale_order.xml index 29d1a980..236a8b14 100755 --- a/indoteknik_custom/views/sale_order.xml +++ b/indoteknik_custom/views/sale_order.xml @@ -48,7 +48,7 @@ role="alert" style="height: 40px; margin-bottom:0px;" attrs="{'invisible':[('partner_is_cbd_locked','=',False)]}"> - <strong>Warning!</strong> Payment Terms Customer terkunci menjadi Cash Before Delivery (C.B.D.) karena ada invoice telah jatuh tempo 30 hari. Silakan ajukan Approval Payment Term untuk membuka kunci. + <strong>Warning!</strong> Payment Terms Customer terkunci menjadi <b>Cash Before Delivery (C.B.D.)</b> karena ada invoice telah jatuh tempo <b>30 hari</b>. Silakan ajukan <b>Approval Payment Term</b> untuk membuka kunci. </div> </xpath> <div class="oe_button_box" name="button_box"> |
