diff options
| -rw-r--r-- | indoteknik_custom/models/stock_picking.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/indoteknik_custom/models/stock_picking.py b/indoteknik_custom/models/stock_picking.py index 33d21c8c..69718c7e 100644 --- a/indoteknik_custom/models/stock_picking.py +++ b/indoteknik_custom/models/stock_picking.py @@ -1916,8 +1916,12 @@ class StockPicking(models.Model): # Hindari log duplikat if not self._has_existing_log(log_line): - # self.with_user(15172).message_post(body=log_line) # Biteship user - self.with_user(15710).message_post(body=log_line) # Biteship user live + biteship_user = self.env['res.users'].sudo().browse(15710) # ID live + # biteship_user = self.env['res.users'].sudo().browse(15710) # ID user (cek di db) + self.sudo().message_post( + body=log_line, + author_id=biteship_user.partner_id.id + ) # Update field-field terkait if updated_fields: |
