diff options
| author | Azka Nathan <darizkyfaz@gmail.com> | 2026-01-01 00:51:07 +0700 |
|---|---|---|
| committer | Azka Nathan <darizkyfaz@gmail.com> | 2026-01-01 00:51:07 +0700 |
| commit | 30076609d11636feed823d4113ae431d80f131f3 (patch) | |
| tree | f233b8bcff4cde12a9dd1666d9c4f3981742518e | |
| parent | 7f75982f2db861e381d418e3dd4311b503a34070 (diff) | |
| parent | f85c9d531f448632986c441f2c36a6163a158589 (diff) | |
Merge branch 'main' of bitbucket.org:altafixco/fixco-addons
pull
| -rw-r--r-- | fixco_custom/models/purchase_order.py | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/fixco_custom/models/purchase_order.py b/fixco_custom/models/purchase_order.py index 01fa001..fdf775a 100644 --- a/fixco_custom/models/purchase_order.py +++ b/fixco_custom/models/purchase_order.py @@ -16,7 +16,7 @@ except ImportError: _logger = logging.getLogger(__name__) - + class PurchaseOrder(models.Model): _inherit = 'purchase.order' @@ -348,16 +348,16 @@ class PurchaseOrder(models.Model): def button_confirm(self): - if self.env.user.id not in [12, 10, 2, 15]: - self.check_buffer_stock() - if self.source == 'manual' and self.env.user.id not in [12, 10, 2, 15]: - raise UserError(_("Anda tidak memiliki akses untuk melakukan konfirmasi PO manual")) + # if self.env.user.id not in [12, 10, 2, 15]: + # self.check_buffer_stock() + # if self.source == 'manual' and self.env.user.id not in [12, 10, 2, 15]: + # raise UserError(_("Anda tidak memiliki akses untuk melakukan konfirmasi PO manual")) res = super(PurchaseOrder, self).button_confirm() - if self.partner_id.id == 270: - self.action_create_order_altama() - + # if self.partner_id.id == 270: + # self.action_create_order_altama() + return res - + def check_buffer_stock(self): insufficient_products = [] @@ -421,11 +421,11 @@ class PurchaseOrder(models.Model): 'target': 'current', 'domain': [('id', 'in', journals.ids)], } - + @api.depends('order_line.price_total', 'biaya_lain_lain') def _amount_all(self): super(PurchaseOrder, self)._amount_all() - + for order in self: amount_total = order.amount_untaxed + order.amount_tax - order.biaya_lain_lain order.amount_total = order.currency_id.round(amount_total) @@ -433,4 +433,4 @@ class PurchaseOrder(models.Model): @api.depends('order_line.discount_amount') def _compute_amount_discount(self): for order in self: - order.amount_discount = sum(line.discount_amount for line in order.order_line)
\ No newline at end of file + order.amount_discount = sum(line.discount_amount for line in order.order_line) |
