diff options
| author | it-fixcomart <it@fixcomart.co.id> | 2024-10-09 15:59:34 +0700 |
|---|---|---|
| committer | it-fixcomart <it@fixcomart.co.id> | 2024-10-09 15:59:34 +0700 |
| commit | 94141d0871e9abed968d3c249eeaf7b3c1ae87d9 (patch) | |
| tree | 2628529a5a001434ca5e4705156aba0448deec2b /indoteknik_custom/models/stock_picking.py | |
| parent | 04d994e53a36ea9a6f7a2c0dd3f5f1b2c0ca9a74 (diff) | |
<iman> update telegram create channel
Diffstat (limited to 'indoteknik_custom/models/stock_picking.py')
| -rw-r--r-- | indoteknik_custom/models/stock_picking.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/indoteknik_custom/models/stock_picking.py b/indoteknik_custom/models/stock_picking.py index 14190474..5397b59f 100644 --- a/indoteknik_custom/models/stock_picking.py +++ b/indoteknik_custom/models/stock_picking.py @@ -4,6 +4,7 @@ from odoo.tools.float_utils import float_is_zero from datetime import datetime from itertools import groupby import pytz, datetime +from odoo.http import request class StockPicking(models.Model): @@ -310,11 +311,17 @@ class StockPicking(models.Model): self.approval_receipt_status = 'pengajuan1' def ask_return_approval(self): + telegram_data = { + 'tittle': 'Permintaan retur ' + self.name, + 'about': 'Permintaan retur ' + self.name, + } + telegram = request.env['website.telegram'].create(telegram_data) for pick in self: if self.env.user.is_accounting: pick.approval_return_status = 'approved' else: pick.approval_return_status = 'pengajuan1' + telegram.create_channel() def calculate_line_no(self): for picking in self: |
