diff options
| author | Azka Nathan <darizkyfaz@gmail.com> | 2025-05-02 16:38:59 +0700 |
|---|---|---|
| committer | Azka Nathan <darizkyfaz@gmail.com> | 2025-05-02 16:38:59 +0700 |
| commit | 786bd9c07e6c3fa562859b389f9dc0bbc0cf22e4 (patch) | |
| tree | ec5a4fa1a1b4601fc7656a1d4576b4bfad1752cb /indoteknik_custom/models/stock_picking.py | |
| parent | dcfe69ad989118ce2d8dc41a9af1ece6b5a57d76 (diff) | |
| parent | 58f5d865f661d60624ca23a10088338ffd0691f7 (diff) | |
Merge branch 'odoo-backup' of bitbucket.org:altafixco/indoteknik-addons into odoo-backup
Diffstat (limited to 'indoteknik_custom/models/stock_picking.py')
| -rw-r--r-- | indoteknik_custom/models/stock_picking.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/indoteknik_custom/models/stock_picking.py b/indoteknik_custom/models/stock_picking.py index c35c3047..a017a090 100644 --- a/indoteknik_custom/models/stock_picking.py +++ b/indoteknik_custom/models/stock_picking.py @@ -158,12 +158,13 @@ class StockPicking(models.Model): linked_manual_bu_out = fields.Many2one('stock.picking', string='BU Out', copy=False) area_name = fields.Char(string="Area", compute="_compute_area_name") - # @api.depends('real_shipping_id.district_id_pengiriman', 'real_shipping_id.city_id_pengiriman') + @api.depends('real_shipping_id.kecamatan_id', 'real_shipping_id.kota_id') def _compute_area_name(self): for record in self: - district = record.real_shipping_id.kelurahan_id.name if record.real_shipping_id.kelurahan_id else '' - city = record.real_shipping_id.kota_id.name if record.real_shipping_id.kota_id else '' + district = record.real_shipping_id.kecamatan_id or '' + city = record.real_shipping_id.kota_id or '' record.area_name = f"{district}, {city}".strip(', ') + # def write(self, vals): # if 'linked_manual_bu_out' in vals: |
