diff options
| author | IT Fixcomart <it@fixcomart.co.id> | 2025-07-02 07:52:28 +0000 |
|---|---|---|
| committer | IT Fixcomart <it@fixcomart.co.id> | 2025-07-02 07:52:28 +0000 |
| commit | 4974971d68ad1e4f593059fa29155ff7f46ad753 (patch) | |
| tree | aab9092cd4202609dd5ccb6646c294d8bc6ecb72 /indoteknik_custom/models | |
| parent | b74109805a2ec65cb4a4b7811fdc34403d2505b2 (diff) | |
| parent | f1f2b012ed156213a623858cb3fb816e6a795f3c (diff) | |
Merged in pay-diff (pull request #346)
(andri) fix pay diff
Diffstat (limited to 'indoteknik_custom/models')
| -rw-r--r-- | indoteknik_custom/models/res_partner.py | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/indoteknik_custom/models/res_partner.py b/indoteknik_custom/models/res_partner.py index f5347bea..1e5cfd62 100644 --- a/indoteknik_custom/models/res_partner.py +++ b/indoteknik_custom/models/res_partner.py @@ -165,21 +165,21 @@ class ResPartner(models.Model): "this feature", tracking=3) telegram_id = fields.Char(string="Telegram") avg_aging= fields.Float(string='Average Aging') - payment_difficulty = fields.Selection([('bermasalah', 'Bermasalah'),('sulit', 'Sulit'),('agak_sulit', 'Agak Sulit'),('normal', 'Normal')], string='Payment Difficulty', compute="_compute_payment_difficulty", inverse = "_inverse_payment_difficulty", tracking=3) + payment_difficulty = fields.Selection([('bermasalah', 'Bermasalah'),('sulit', 'Sulit'),('agak_sulit', 'Agak Sulit'),('normal', 'Normal')], string='Payment Difficulty', compute="", inverse = "", tracking=3) payment_history_url = fields.Text(string='Payment History URL') - @api.depends('parent_id.payment_difficulty') - def _compute_payment_difficulty(self): - for partner in self: - if partner.parent_id: - partner.payment_difficulty = partner.parent_id.payment_difficulty - - def _inverse_payment_difficulty(self): - for partner in self: - if not partner.parent_id: - partner.child_ids.write({ - 'payment_difficulty': partner.payment_difficulty - }) + # @api.depends('parent_id.payment_difficulty') + # def _compute_payment_difficulty(self): + # for partner in self: + # if partner.parent_id: + # partner.payment_difficulty = partner.parent_id.payment_difficulty + + # def _inverse_payment_difficulty(self): + # for partner in self: + # if not partner.parent_id: + # partner.child_ids.write({ + # 'payment_difficulty': partner.payment_difficulty + # }) @api.model def _default_payment_term(self): |
