diff options
| author | it-fixcomart <it@fixcomart.co.id> | 2024-10-11 11:21:52 +0700 |
|---|---|---|
| committer | it-fixcomart <it@fixcomart.co.id> | 2024-10-11 11:21:52 +0700 |
| commit | 49b8f17c48a04b28a54608cf45367266f35cf420 (patch) | |
| tree | a0854c79c1b513f511be6501c30c6d6ca10457f5 /indoteknik_api/controllers/api_v1 | |
| parent | b8edd5b930595fdc415d94c0f0d09fa5ecbe43ba (diff) | |
<iman> add dokumentasi driver
Diffstat (limited to 'indoteknik_api/controllers/api_v1')
| -rw-r--r-- | indoteknik_api/controllers/api_v1/stock_picking.py | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/indoteknik_api/controllers/api_v1/stock_picking.py b/indoteknik_api/controllers/api_v1/stock_picking.py index 8b941c16..c8bc9a7e 100644 --- a/indoteknik_api/controllers/api_v1/stock_picking.py +++ b/indoteknik_api/controllers/api_v1/stock_picking.py @@ -110,4 +110,25 @@ class StockPicking(controller.Controller): if not picking: return self.response(None) - return self.response(picking.get_tracking_detail())
\ No newline at end of file + return self.response(picking.get_tracking_detail()) + + @http.route(prefix + 'stock-picking/<picking_code>/documentation', auth='public', methods=['PUT', 'OPTIONS'], csrf=False) + @controller.Controller.must_authorized() + def write_partner_stock_picking_documentation(self, **kw): + picking_code = int(kw.get('picking_code', 0)) + sj_document = kw.get('sj_document', False) + paket_document = kw.get('paket_document', False) + + params = {'sj_documentation': sj_document, + 'paket_documentation': paket_document + } + + picking_data = request.env['stock.picking'].search([('picking_code', '=', picking_code)], limit=1) + + if not picking_data: + return self.response(code=404, description='picking not found') + picking_data.write(params) + + return self.response({ + 'name': picking_data.name + })
\ No newline at end of file |
