diff options
| author | Indoteknik . <it@fixcomart.co.id> | 2025-08-06 13:52:21 +0700 |
|---|---|---|
| committer | Indoteknik . <it@fixcomart.co.id> | 2025-08-06 13:52:21 +0700 |
| commit | 7ebcf1675e55dae39f769466e5bf5ef064646f27 (patch) | |
| tree | c7fccfb7e36678b9b5ee4145dee85b37dcbcd94d | |
| parent | 09032d721277221730efa3db7a2d8353524d509c (diff) | |
| parent | ab11c9455c6e125195ec5004adfd855058d46f5f (diff) | |
Merge branch 'odoo-backup' of https://bitbucket.org/altafixco/indoteknik-addons into reminder-tempo-v2
18 files changed, 229 insertions, 52 deletions
diff --git a/indoteknik_api/controllers/api_v1/sale_order.py b/indoteknik_api/controllers/api_v1/sale_order.py index fd460ea0..2348a126 100644 --- a/indoteknik_api/controllers/api_v1/sale_order.py +++ b/indoteknik_api/controllers/api_v1/sale_order.py @@ -607,9 +607,6 @@ class SaleOrder(controller.Controller): if is_flash_sale_item: is_has_disc = True _logger.info("Item is flash sale product - marked as discounted") - elif discount_percent > 0 and not global_flash_sale: - is_has_disc = True - _logger.info(f"Item has discount {discount_percent}% - marked as discounted") elif global_flash_sale: _logger.info("Global flash sale active but item not eligible - not marked as discounted") diff --git a/indoteknik_api/controllers/api_v1/stock_picking.py b/indoteknik_api/controllers/api_v1/stock_picking.py index 85b0fbba..762e17c5 100644 --- a/indoteknik_api/controllers/api_v1/stock_picking.py +++ b/indoteknik_api/controllers/api_v1/stock_picking.py @@ -125,28 +125,33 @@ class StockPicking(controller.Controller): @http.route(prefix + 'stock-picking/<scanid>/documentation', auth='public', methods=['PUT', 'OPTIONS'], csrf=False) @controller.Controller.must_authorized() def write_partner_stock_picking_documentation(self, **kw): - scanid = int(kw.get('scanid', 0)) + scanid = kw.get('scanid', '').strip() sj_document = kw.get('sj_document', False) paket_document = kw.get('paket_document', False) - params = {'sj_documentation': sj_document, - 'paket_documentation': paket_document, - 'driver_arrival_date': datetime.utcnow(), - } + params = { + 'sj_documentation': sj_document, + 'paket_documentation': paket_document, + 'driver_arrival_date': datetime.utcnow(), + } - picking_data = request.env['stock.picking'].search([('id', '=', scanid)], limit=1) + picking_data = False + if scanid.isdigit() and int(scanid) < 2147483647: + picking_data = request.env['stock.picking'].search([('id', '=', int(scanid))], limit=1) if not picking_data: picking_data = request.env['stock.picking'].search([('picking_code', '=', scanid)], 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 }) + @http.route(prefix + 'webhook/biteship', type='json', auth='public', methods=['POST'], csrf=False) def update_status_from_biteship(self, **kw): _logger.info("Biteship Webhook: Request received at controller start (type='json').") diff --git a/indoteknik_custom/__manifest__.py b/indoteknik_custom/__manifest__.py index 2a4db273..d1ae681a 100755 --- a/indoteknik_custom/__manifest__.py +++ b/indoteknik_custom/__manifest__.py @@ -174,6 +174,7 @@ # 'views/tukar_guling_return_views.xml' 'views/tukar_guling_po.xml', # 'views/refund_sale_order.xml', + 'views/update_date_planned_po_wizard_view.xml', ], 'demo': [], 'css': [], diff --git a/indoteknik_custom/models/__init__.py b/indoteknik_custom/models/__init__.py index 51d25c1f..3a9f9312 100755 --- a/indoteknik_custom/models/__init__.py +++ b/indoteknik_custom/models/__init__.py @@ -156,3 +156,4 @@ from . import refund_sale_order # from . import patch from . import tukar_guling from . import tukar_guling_po +from . import update_date_planned_po_wizard
\ No newline at end of file diff --git a/indoteknik_custom/models/account_move.py b/indoteknik_custom/models/account_move.py index 53e5a8e8..bf7e2d68 100644 --- a/indoteknik_custom/models/account_move.py +++ b/indoteknik_custom/models/account_move.py @@ -94,6 +94,23 @@ class AccountMove(models.Model): compute='_compute_has_refund_so', ) + payment_date = fields.Date(string="Payment Date", compute='_compute_payment_date') + + def _compute_payment_date(self): + for move in self: + accountPayment = self.env['account.payment'] + + payment = accountPayment.search([]).filtered( + lambda p: move.id in p.reconciled_invoice_ids.ids + ) + + if payment: + move.payment_date = payment[0].date + elif move.reklas_misc_id: + move.payment_date = move.reklas_misc_id.date + else: + move.payment_date = False + # def name_get(self): # result = [] # for move in self: diff --git a/indoteknik_custom/models/commision.py b/indoteknik_custom/models/commision.py index 9f7df464..6d538b83 100644 --- a/indoteknik_custom/models/commision.py +++ b/indoteknik_custom/models/commision.py @@ -208,7 +208,7 @@ class CustomerCommision(models.Model): ('pending', 'Pending'), ('payment', 'Payment'), ], string='Payment Status', copy=False, readonly=True, tracking=3, default='pending') - note_finnance = fields.Text('Notes Finnance') + note_finnance = fields.Text('Notes Finance') reason_reject = fields.Char(string='Reason Reaject', tracking=True, track_visibility='onchange') approved_by = fields.Char(string='Approved By', tracking=True, track_visibility='always') @@ -399,6 +399,27 @@ class CustomerCommision(models.Model): # result = super(CustomerCommision, self).create(vals) # return result + def _fill_note_finance(self): + for rec in self: + fee_percent = rec.commision_percent or 0.0 + dpp = rec.total_dpp or 0.0 + + fee = dpp * fee_percent / 100 + pph21 = 0.5 * fee * 0.05 + fee_net = fee - pph21 + rec.note_finnance = ( + "Kelengkapan data penerima fee sudah lengkap (NPWP dan KTP)\n" + f"Perhitungan Fee ({fee_percent:.0f}%) dari nilai DPP pada Invoice terlampir sudah\n" + f"sesuai yaitu Rp {fee:,.0f}\n" + "Sesuai PMK No. 168 tahun 2023, komisi fee dikenakan PPH 21\n" + "sebesar :\n" + f"= 50% x Penghasilan Bruto x 5%\n" + f"= 50% x Rp {fee:,.0f} x 5%\n" + f"= Rp {pph21:,.0f}\n" + "Sehingga fee bersih sebesar\n" + f"= Rp {fee:,.0f} - Rp {pph21:,.0f}\n" + f"= Rp {fee_net:,.0f}" + ) def action_confirm_customer_commision(self): jakarta_tz = pytz.timezone('Asia/Jakarta') now = datetime.now(jakarta_tz) @@ -425,6 +446,8 @@ class CustomerCommision(models.Model): elif self.status == 'pengajuan4' and self.env.user.id == 1272: for line in self.commision_lines: line.invoice_id.is_customer_commision = True + if self.commision_type == 'fee': + self._fill_note_finance() self.status = 'approved' self.approved_by = (self.approved_by + ', ' if self.approved_by else '') + self.env.user.name self.date_approved_accounting = now_naive diff --git a/indoteknik_custom/models/cust_commision.py b/indoteknik_custom/models/cust_commision.py index c3105cfd..05c68935 100644 --- a/indoteknik_custom/models/cust_commision.py +++ b/indoteknik_custom/models/cust_commision.py @@ -34,4 +34,3 @@ class CustCommision(models.Model): for rec in duplicate_partner: if self.commision_type == rec.commision_type: raise UserError('Partner already exists') -
\ No newline at end of file diff --git a/indoteknik_custom/models/purchase_order.py b/indoteknik_custom/models/purchase_order.py index 27aca0d1..103a9131 100755 --- a/indoteknik_custom/models/purchase_order.py +++ b/indoteknik_custom/models/purchase_order.py @@ -1083,9 +1083,9 @@ class PurchaseOrder(models.Model): # Tambahan: redirect ke BU hanya untuk single PO yang berhasil dikonfirmasi _logger.info("Jumlah PO: %s | State: %s", len(self), self.state) - if len(self) == 1: - _logger.info("Redirecting ke BU") - return self.action_view_related_bu() + # if len(self) == 1: + # _logger.info("Redirecting ke BU") + # return self.action_view_related_bu() return res diff --git a/indoteknik_custom/models/sale_order.py b/indoteknik_custom/models/sale_order.py index 47018f52..94cfdc39 100755 --- a/indoteknik_custom/models/sale_order.py +++ b/indoteknik_custom/models/sale_order.py @@ -163,7 +163,7 @@ class SaleOrder(models.Model): carrier_id = fields.Many2one('delivery.carrier', string='Shipping Method', tracking=3) have_visit_service = fields.Boolean(string='Have Visit Service', compute='_have_visit_service', help='To compute is customer get visit service') - delivery_amt = fields.Float(string='Delivery Amt', copy=False) + delivery_amt = fields.Float(string='Delivery Amt', copy=False, tracking=True) shipping_cost_covered = fields.Selection([ ('indoteknik', 'Indoteknik'), ('customer', 'Customer') diff --git a/indoteknik_custom/models/tukar_guling.py b/indoteknik_custom/models/tukar_guling.py index 3f81393a..8de5b671 100644 --- a/indoteknik_custom/models/tukar_guling.py +++ b/indoteknik_custom/models/tukar_guling.py @@ -74,6 +74,38 @@ class TukarGuling(models.Model): date_sales = fields.Datetime('Approved Date Sales', tracking=3, readonly=True) date_logistic = fields.Datetime('Approved Date Logistic', tracking=3, readonly=True) + val_inv_opt = fields.Selection([ + ('tanpa_cancel', 'Tanpa Cancel Invoice'), + ('cancel_invoice', 'Cancel Invoice'), + ], tracking=3, string='Invoice Option') + + is_has_invoice = fields.Boolean('Has Invoice?', compute='_compute_is_has_invoice', readonly=True, default=False) + + invoice_id = fields.Many2many('account.move', string='Invoice Ref', readonly=True) + + @api.depends('origin') + def _compute_is_has_invoice(self): + for rec in self: + invoices = self.env['account.move'].search([ + ('invoice_origin', 'ilike', rec.origin), + ('move_type', '=', 'out_invoice'), # hanya invoice + ('state', 'not in', ['draft', 'cancel']) + ]) + if invoices: + rec.is_has_invoice = True + rec.invoice_id = invoices + else: + rec.is_has_invoice = False + + def set_opt(self): + if not self.val_inv_opt and self.is_has_invoice == True: + raise UserError("Kalau sudah ada invoice Return Invoice Option harus diisi!") + for rec in self: + if rec.val_inv_opt == 'cancel_invoice' and self.is_has_invoice == True: + raise UserError("Tidak bisa mengubah Return karena sudah ada invoice dan belum di cancel.") + elif rec.val_inv_opt == 'tanpa_cancel' and self.is_has_invoice == True: + continue + # @api.onchange('operations') # def get_partner_id(self): # if self.operations and self.operations.partner_id and self.operations.partner_id.name: @@ -288,18 +320,17 @@ class TukarGuling(models.Model): # ('state', '!=', 'cancel') # ]) > 0 - @api.constrains('return_type', 'operations') - def _check_invoice_on_revisi_so(self): - for record in self: - if record.return_type == 'revisi_so' and record.origin: - invoices = self.env['account.move'].search([ - ('invoice_origin', 'ilike', record.origin), - ('state', 'not in', ['draft', 'cancel']) - ]) - if invoices: - raise ValidationError( - _("Tidak bisa memilih Return Type 'Revisi SO' karena dokumen %s sudah dibuat invoice.") % record.origin - ) + # def _check_invoice_on_revisi_so(self): + # for record in self: + # if record.return_type == 'revisi_so' and record.origin: + # invoices = self.env['account.move'].search([ + # ('invoice_origin', 'ilike', record.origin), + # ('state', 'not in', ['draft', 'cancel']) + # ]) + # if invoices: + # raise ValidationError( + # _("Tidak bisa memilih Return Type 'Revisi SO' karena dokumen %s sudah dibuat invoice.") % record.origin + # ) @api.model def create(self, vals): @@ -348,7 +379,7 @@ class TukarGuling(models.Model): self.ensure_one() if self.operations.picking_type_id.id not in [29, 30]: raise UserError("❌ Picking type harus BU/OUT atau BU/PICK") - self._check_invoice_on_revisi_so() + # self._check_invoice_on_revisi_so() operasi = self.operations.picking_type_id.id tipe = self.return_type pp = vals.get('return_type', tipe) @@ -455,7 +486,7 @@ class TukarGuling(models.Model): raise UserError( _("Qty di Koli tidak sesuai dengan qty retur untuk produk %s") % line.product_id.display_name) - self._check_invoice_on_revisi_so() + # self._check_invoice_on_revisi_so() self._validate_product_lines() if self.state != 'draft': @@ -506,7 +537,7 @@ class TukarGuling(models.Model): def action_approve(self): self.ensure_one() self._validate_product_lines() - self._check_invoice_on_revisi_so() + # self._check_invoice_on_revisi_so() self._check_not_allow_tukar_guling_on_bu_pick() operasi = self.operations.picking_type_id.id @@ -546,6 +577,8 @@ class TukarGuling(models.Model): elif rec.state == 'approval_finance': if not rec.env.user.has_group('indoteknik_custom.group_role_fat'): raise UserError("Hanya Finance Manager yang boleh approve tahap ini.") + # rec._check_invoice_on_revisi_so() + rec.set_opt() rec.state = 'approval_logistic' rec.date_finance = now diff --git a/indoteknik_custom/models/tukar_guling_po.py b/indoteknik_custom/models/tukar_guling_po.py index 92d8c9a6..5d444472 100644 --- a/indoteknik_custom/models/tukar_guling_po.py +++ b/indoteknik_custom/models/tukar_guling_po.py @@ -54,6 +54,38 @@ class TukarGulingPO(models.Model): ('cancel', 'Cancel'), ], string='Status', default='draft', tracking=3) + val_bil_opt = fields.Selection([ + ('tanpa_cancel', 'Tanpa Cancel Bill'), + ('cancel_bill', 'Cancel Bill'), + ], tracking=3, string='Bill Option') + + is_has_bill = fields.Boolean('Has Bill?', compute='_compute_is_has_bill', readonly=True, default=False) + + bill_id = fields.Many2many('account.move', string='Bill Ref', readonly=True) + + @api.depends('origin') + def _compute_is_has_bill(self): + for rec in self: + bills = self.env['account.move'].search([ + ('invoice_origin', 'ilike', rec.origin), + ('move_type', '=', 'in_invoice'), # hanya vendor bill + ('state', 'not in', ['draft', 'cancel']) + ]) + if bills: + rec.is_has_bill = True + rec.bill_id = bills + else: + rec.is_has_bill = False + + def set_opt(self): + if not self.val_bil_opt and self.is_has_bill == True: + raise UserError("Kalau sudah ada bill Return Bill Option harus diisi!") + for rec in self: + if rec.val_bil_opt == 'cancel_bill' and self.is_has_bill == True: + raise UserError("Tidak bisa mengubah Return karena sudah ada bill dan belum di cancel.") + elif rec.val_bil_opt == 'tanpa_cancel' and self.is_has_bill == True: + continue + @api.model def create(self, vals): # Generate sequence number @@ -74,19 +106,18 @@ class TukarGulingPO(models.Model): return res - @api.constrains('return_type', 'operations') - def _check_bill_on_revisi_po(self): - for record in self: - if record.return_type == 'revisi_po' and record.origin: - bills = self.env['account.move'].search([ - ('invoice_origin', 'ilike', record.origin), - ('move_type', '=', 'in_invoice'), # hanya vendor bill - ('state', 'not in', ['draft', 'cancel']) - ]) - if bills: - raise ValidationError( - _("Tidak bisa memilih Return Type 'Revisi PO' karena PO %s sudah dibuat vendor bill.") % record.origin - ) + # def _check_bill_on_revisi_po(self): + # for record in self: + # if record.return_type == 'revisi_po' and record.origin: + # bills = self.env['account.move'].search([ + # ('invoice_origin', 'ilike', record.origin), + # ('move_type', '=', 'in_invoice'), # hanya vendor bill + # ('state', 'not in', ['draft', 'cancel']) + # ]) + # if bills: + # raise ValidationError( + # _("Tidak bisa memilih Return Type 'Revisi PO' karena PO %s sudah dibuat vendor bill. Harus Cancel Jika ingin melanjutkan") % record.origin + # ) @api.onchange('operations') def _onchange_operations(self): @@ -281,7 +312,7 @@ class TukarGulingPO(models.Model): def write(self, vals): if self.operations.picking_type_id.id not in [75, 28]: raise UserError("❌ Tidak bisa retur bukan BU/INPUT atau BU/PUT!") - self._check_bill_on_revisi_po() + # self._check_bill_on_revisi_po() tipe = vals.get('return_type', self.return_type) if self.operations and self.operations.picking_type_id.id == 28 and tipe == 'tukar_guling': @@ -349,7 +380,7 @@ class TukarGulingPO(models.Model): def action_submit(self): self.ensure_one() - self._check_bill_on_revisi_po() + # self._check_bill_on_revisi_po() self._validate_product_lines() self._check_not_allow_tukar_guling_on_bu_input() @@ -385,7 +416,7 @@ class TukarGulingPO(models.Model): def action_approve(self): self.ensure_one() self._validate_product_lines() - self._check_bill_on_revisi_po() + # self._check_bill_on_revisi_po() self._check_not_allow_tukar_guling_on_bu_input() if not self.operations: @@ -400,19 +431,21 @@ class TukarGulingPO(models.Model): for rec in self: if rec.state == 'approval_purchase': if not rec.env.user.has_group('indoteknik_custom.group_role_sales'): - raise UserError("Hanya Sales Manager yang boleh approve tahap ini.") + raise UserError("Hanya Sales yang boleh approve tahap ini.") rec.state = 'approval_finance' rec.date_purchase = now elif rec.state == 'approval_finance': if not rec.env.user.has_group('indoteknik_custom.group_role_fat'): - raise UserError("Hanya Finance Manager yang boleh approve tahap ini.") + raise UserError("Hanya Finance yang boleh approve tahap ini.") + # rec._check_bill_on_revisi_po() + rec.set_opt() rec.state = 'approval_logistic' rec.date_finance = now elif rec.state == 'approval_logistic': if not rec.env.user.has_group('indoteknik_custom.group_role_logistic'): - raise UserError("Hanya Logistic Manager yang boleh approve tahap ini.") + raise UserError("Hanya Logistic yang boleh approve tahap ini.") rec.state = 'approved' rec._create_pickings() rec.date_logistic = now @@ -427,7 +460,7 @@ class TukarGulingPO(models.Model): ('state', '=', 'done'), ('picking_type_id.id', '=', 76) ]) - if self.state == 'aproved' and prt: + if self.state == 'approved' and prt: self.state = 'done' # bu put rev po elif self.operations.picking_type_id.id == 75 and self.return_type == 'revisi_po': @@ -440,7 +473,7 @@ class TukarGulingPO(models.Model): ('state', '=', 'done'), ('picking_type_id.id', '=', 76) ]) - if self.state == 'aproved' and total_prt > 0 and prt == total_prt: + if self.state == 'approved' and total_prt > 0 and prt == total_prt: self.state = 'done' # bu put tukar guling elif self.operations.picking_type_id.id == 75 and self.return_type == 'tukar_guling': diff --git a/indoteknik_custom/models/update_date_planned_po_wizard.py b/indoteknik_custom/models/update_date_planned_po_wizard.py new file mode 100644 index 00000000..a0d241c8 --- /dev/null +++ b/indoteknik_custom/models/update_date_planned_po_wizard.py @@ -0,0 +1,14 @@ +from odoo import models, fields, api + +class PurchaseOrderUpdateDateWizard(models.TransientModel): + _name = 'purchase.order.update.date.wizard' + _description = 'Wizard to Update Receipt Date on Purchase Order Lines' + + date_planned = fields.Datetime(string="New Receipt Date", required=True) + + def action_update_date(self): + active_ids = self.env.context.get('active_ids', []) + orders = self.env['purchase.order'].browse(active_ids) + for order in orders: + order.write({'date_planned': self.date_planned}) + return {'type': 'ir.actions.act_window_close'} diff --git a/indoteknik_custom/security/ir.model.access.csv b/indoteknik_custom/security/ir.model.access.csv index 9b43bf2a..d6e44f9d 100755 --- a/indoteknik_custom/security/ir.model.access.csv +++ b/indoteknik_custom/security/ir.model.access.csv @@ -191,4 +191,5 @@ access_tukar_guling_all_users,tukar.guling.all.users,model_tukar_guling,base.gro access_tukar_guling_line_all_users,tukar.guling.line.all.users,model_tukar_guling_line,base.group_user,1,1,1,1 access_tukar_guling_po_all_users,tukar.guling.po.all.users,model_tukar_guling_po,base.group_user,1,1,1,1 access_tukar_guling_line_po_all_users,tukar.guling.line.po.all.users,model_tukar_guling_line_po,base.group_user,1,1,1,1 -access_tukar_guling_mapping_koli_all_users,tukar.guling.mapping.koli.all.users,model_tukar_guling_mapping_koli,base.group_user,1,1,1,1
\ No newline at end of file +access_tukar_guling_mapping_koli_all_users,tukar.guling.mapping.koli.all.users,model_tukar_guling_mapping_koli,base.group_user,1,1,1,1 +access_purchase_order_update_date_wizard,access.purchase.order.update.date.wizard,model_purchase_order_update_date_wizard,base.group_user,1,1,1,1
\ No newline at end of file diff --git a/indoteknik_custom/views/account_move.xml b/indoteknik_custom/views/account_move.xml index 9b1c791b..23f2d931 100644 --- a/indoteknik_custom/views/account_move.xml +++ b/indoteknik_custom/views/account_move.xml @@ -29,6 +29,7 @@ </field> <field name="payment_reference" position="after"> <field name="date_completed" readonly="1" attrs="{'invisible': [('move_type', '!=', 'out_invoice')]}"/> + <field name="payment_date" readonly="1" attrs="{'invisible': [('move_type', '!=', 'out_invoice')]}"/> <field name="reklas_id" attrs="{'invisible': [('move_type', '!=', 'out_invoice')]}"/> </field> <field name="invoice_date" position="after"> diff --git a/indoteknik_custom/views/purchase_order.xml b/indoteknik_custom/views/purchase_order.xml index fedcb4f9..15cdc788 100755 --- a/indoteknik_custom/views/purchase_order.xml +++ b/indoteknik_custom/views/purchase_order.xml @@ -428,4 +428,24 @@ <field name="code">action = records.open_form_multi_cancel()</field> </record> </data> + <data> + <record id="action_update_receipt_date_po" model="ir.actions.server"> + <field name="name">Update Receipt Date</field> + <field name="model_id" ref="purchase.model_purchase_order"/> + <field name="binding_model_id" ref="purchase.model_purchase_order"/> + <field name="state">code</field> + <field name="binding_view_types">list</field> + <field name="code"> + action = { + 'type': 'ir.actions.act_window', + 'res_model': 'purchase.order.update.date.wizard', + 'view_mode': 'form', + 'target': 'new', + 'context': { + 'active_ids': env.context.get('active_ids', []), + }, + } + </field> + </record> + </data> </odoo>
\ No newline at end of file diff --git a/indoteknik_custom/views/tukar_guling.xml b/indoteknik_custom/views/tukar_guling.xml index c23995d3..20aa2eef 100644 --- a/indoteknik_custom/views/tukar_guling.xml +++ b/indoteknik_custom/views/tukar_guling.xml @@ -84,8 +84,11 @@ <field name="operations" attrs="{'readonly': [('state', 'not in', 'draft')]}"/> <field name="origin" readonly="1"/> + <field name="is_has_invoice" readonly="1"/> + <field name="invoice_id" readonly="1" widget="many2many_tags"/> </group> <group> + <field name="val_inv_opt" attrs="{'invisible': [('is_has_invoice', '=', False)]}"/> <field name="ba_num" string="Nomor BA"/> <field name="notes"/> <field name="date_sales" readonly="1"/> diff --git a/indoteknik_custom/views/tukar_guling_po.xml b/indoteknik_custom/views/tukar_guling_po.xml index accf7dbc..bc696a3d 100644 --- a/indoteknik_custom/views/tukar_guling_po.xml +++ b/indoteknik_custom/views/tukar_guling_po.xml @@ -90,9 +90,13 @@ 'required': [('return_type', 'in', ['revisi_po', 'tukar_guling'])] }"/> <field name="origin" readonly="1"/> + <field name="is_has_bill" readonly="1"/> +<!-- <field name="bill_id" readonly="1" />--> + <field name="bill_id" readonly="1" widget="many2many_tags"/> <!-- <field name="origin_so" readonly="1"/>--> </group> <group> + <field name="val_bil_opt" attrs="{'invisible': [('is_has_bill', '=', False)]}"/> <field name="ba_num" string="Nomor BA"/> <field name="notes"/> <field name="date_purchase" readonly="1"/> diff --git a/indoteknik_custom/views/update_date_planned_po_wizard_view.xml b/indoteknik_custom/views/update_date_planned_po_wizard_view.xml new file mode 100644 index 00000000..6b3ab991 --- /dev/null +++ b/indoteknik_custom/views/update_date_planned_po_wizard_view.xml @@ -0,0 +1,25 @@ +<odoo> + <record id="view_update_date_planned_po_wizard_form" model="ir.ui.view"> + <field name="name">purchase.order.update.date.wizard.form</field> + <field name="model">purchase.order.update.date.wizard</field> + <field name="arch" type="xml"> + <form string="Update Receipt Date"> + <group> + <field name="date_planned"/> + </group> + <footer> + <button string="Apply" type="object" name="action_update_date" class="btn-primary"/> + <button string="Cancel" special="cancel"/> + </footer> + </form> + </field> + </record> + + <record id="action_update_date_planned_po_wizard" model="ir.actions.act_window"> + <field name="name">Update Receipt Date</field> + <field name="res_model">purchase.order.update.date.wizard</field> + <field name="view_mode">form</field> + <field name="target">new</field> + </record> + </odoo> +
\ No newline at end of file |
