diff options
| author | Azka Nathan <darizkyfaz@gmail.com> | 2025-12-02 11:09:10 +0700 |
|---|---|---|
| committer | Azka Nathan <darizkyfaz@gmail.com> | 2025-12-02 11:09:10 +0700 |
| commit | 6b255061a752a5d8cc9af65b98f39cf0abe1824d (patch) | |
| tree | 92311cd3d4d7e147d3d39e8018e77793d4512a67 | |
| parent | a90dd3de9881af1aa1f4e444395bed8f3cac7a8e (diff) | |
push
| -rwxr-xr-x | fixco_custom/models/stock_picking.py | 14 | ||||
| -rwxr-xr-x | fixco_custom/views/stock_picking.xml | 1 |
2 files changed, 3 insertions, 12 deletions
diff --git a/fixco_custom/models/stock_picking.py b/fixco_custom/models/stock_picking.py index 11e24a6..916ac9f 100755 --- a/fixco_custom/models/stock_picking.py +++ b/fixco_custom/models/stock_picking.py @@ -51,19 +51,9 @@ class StockPicking(models.Model): ) def button_validate(self): - checked_products = self.mapped('check_product_lines').mapped('product_id') - picking_lines = self.move_line_ids_without_package - - missing_products = [ - line.product_id.display_name - for line in picking_lines - if line.product_id not in checked_products - ] - - if missing_products: + if len(self.check_product_lines) == 0: raise UserError(_( - "Product ini belum discan:\n- %s" - % "\n- ".join(missing_products) + "Belum ada check product, gabisa validate" )) return super(StockPicking, self).button_validate() diff --git a/fixco_custom/views/stock_picking.xml b/fixco_custom/views/stock_picking.xml index ac814fc..f8d0934 100755 --- a/fixco_custom/views/stock_picking.xml +++ b/fixco_custom/views/stock_picking.xml @@ -22,6 +22,7 @@ <button name="label_ginee" string="Print Label Ginee" type="object" + attrs="{'invisible': [('picking_type_code', '!=', 'outgoing')]}" /> <button name="action_create_invoice_from_mr" string="Create Bill" |
