From ca5912d9f29f4bb2e7b482cce01f917285ed53cb Mon Sep 17 00:00:00 2001 From: Azka Nathan Date: Mon, 4 Aug 2025 09:55:46 +0700 Subject: penyusutan, reklas, journal uang muka --- fixco_custom/models/stock_picking.py | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'fixco_custom/models/stock_picking.py') diff --git a/fixco_custom/models/stock_picking.py b/fixco_custom/models/stock_picking.py index d38f8a4..408e055 100755 --- a/fixco_custom/models/stock_picking.py +++ b/fixco_custom/models/stock_picking.py @@ -43,6 +43,7 @@ class StockPicking(models.Model): compute="_compute_pdf_binary", store=False ) + is_printed = fields.Boolean(string="Sudah Dicetak", default=False) def action_create_invoice_from_mr(self): """Create the invoice associated to the PO. @@ -464,4 +465,20 @@ class CheckProduct(models.Model): ) % (record.product_id.display_name)) # Set the quantity to the entered value - record.quantity = record.quantity \ No newline at end of file + record.quantity = record.quantity + +class PickingReportCustom(models.AbstractModel): + _name = 'report.fixco_custom.report_picking_list_custom' + _description = 'Custom Picking List Report' + + def _get_report_values(self, docids, data=None): + pickings = self.env['stock.picking'].browse(docids) + + # Update flag is_printed jadi True + pickings.write({'is_printed': True}) + + return { + 'doc_ids': docids, + 'doc_model': 'stock.picking', + 'docs': pickings, + } \ No newline at end of file -- cgit v1.2.3