summaryrefslogtreecommitdiff
path: root/indoteknik_custom
diff options
context:
space:
mode:
Diffstat (limited to 'indoteknik_custom')
-rw-r--r--indoteknik_custom/models/account_move.py5
-rw-r--r--indoteknik_custom/models/commision.py4
-rw-r--r--indoteknik_custom/models/dunning_run.py1
-rw-r--r--indoteknik_custom/models/users.py2
-rw-r--r--indoteknik_custom/models/voucher.py2
-rw-r--r--indoteknik_custom/views/customer_commision.xml8
-rw-r--r--indoteknik_custom/views/users.xml2
7 files changed, 21 insertions, 3 deletions
diff --git a/indoteknik_custom/models/account_move.py b/indoteknik_custom/models/account_move.py
index fe9db583..d55cca38 100644
--- a/indoteknik_custom/models/account_move.py
+++ b/indoteknik_custom/models/account_move.py
@@ -48,8 +48,9 @@ class AccountMove(models.Model):
def unlink(self):
res = super(AccountMove, self).unlink()
- if self.state == 'posted':
- raise UserError('Data Hanya Bisa Di Cancel')
+ for rec in self:
+ if rec.state == 'posted':
+ raise UserError('Data Hanya Bisa Di Cancel')
return res
def button_cancel(self):
diff --git a/indoteknik_custom/models/commision.py b/indoteknik_custom/models/commision.py
index d4942a0d..a11d85c7 100644
--- a/indoteknik_custom/models/commision.py
+++ b/indoteknik_custom/models/commision.py
@@ -148,6 +148,10 @@ class CustomerCommision(models.Model):
('cashback', 'Cashback'),
('rebate', 'Rebate'),
], string='Commision Type', required=True)
+ bank_name = fields.Char(string='Bank', tracking=3)
+ account_name = fields.Char(string='Account Name', tracking=3)
+ bank_account = fields.Char(string='Account No', tracking=3)
+ note_transfer = fields.Char(string='Keterangan')
# add status for type of commision, fee, rebate / cashback
# include child or not?
diff --git a/indoteknik_custom/models/dunning_run.py b/indoteknik_custom/models/dunning_run.py
index 8e5b2c19..abfd68be 100644
--- a/indoteknik_custom/models/dunning_run.py
+++ b/indoteknik_custom/models/dunning_run.py
@@ -10,6 +10,7 @@ class DunningRun(models.Model):
_name = 'dunning.run'
_description = 'Dunning Run'
_order = 'dunning_date desc, id desc'
+ _rec_name = 'number'
number = fields.Char(string='Document No', index=True, copy=False, readonly=True)
dunning_date = fields.Date(string='Dunning Date', required=True)
diff --git a/indoteknik_custom/models/users.py b/indoteknik_custom/models/users.py
index 2ff9933e..d95b56e7 100644
--- a/indoteknik_custom/models/users.py
+++ b/indoteknik_custom/models/users.py
@@ -12,6 +12,8 @@ class Users(models.Model):
is_logistic_approver = fields.Boolean(string='Logistic Approver', help='Berhak Approval Penerimaan Barang')
is_editor_product = fields.Boolean(string='Editor Product', help='Berhak Mengedit Data Product')
is_admin_reconcile = fields.Boolean(string='Admin Reconcile', help='Berhak Mengedit Journal Reconcile')
+ is_inbound = fields.Boolean(string='Operator Inbound')
+ is_outbound = fields.Boolean(string='Operator Outbound')
def notify_internal_users(self, message, title):
users = self.search([('share', '=', False)])
diff --git a/indoteknik_custom/models/voucher.py b/indoteknik_custom/models/voucher.py
index 66c50c24..2eedc861 100644
--- a/indoteknik_custom/models/voucher.py
+++ b/indoteknik_custom/models/voucher.py
@@ -219,7 +219,7 @@ class Voucher(models.Model):
tnc.append(f'<li>Voucher berlaku {self._res_remaining_time()} lagi</li>')
tnc.append(f'<li>Voucher tidak bisa digunakan apabila terdapat produk flash sale</li>')
if len(self.voucher_line) > 0:
- brand_names = ', '.join([x.manufacture_id.x_name for x in self.voucher_line])
+ brand_names = ', '.join([x.manufacture_id.x_name or '' for x in self.voucher_line])
tnc.append(f'<li>Voucher berlaku untuk produk dari brand {brand_names}</li>')
tnc.append(self.generate_detail_tnc())
tnc.append('</ol>')
diff --git a/indoteknik_custom/views/customer_commision.xml b/indoteknik_custom/views/customer_commision.xml
index 008c79f8..993521ca 100644
--- a/indoteknik_custom/views/customer_commision.xml
+++ b/indoteknik_custom/views/customer_commision.xml
@@ -72,6 +72,14 @@
<page string="Lines">
<field name="commision_lines"/>
</page>
+ <page string="Other Info" name="customer_commision_info">
+ <group>
+ <field name="bank_name"/>
+ <field name="account_name"/>
+ <field name="bank_account"/>
+ <field name="note_transfer"/>
+ </group>
+ </page>
</notebook>
</sheet>
<div class="oe_chatter">
diff --git a/indoteknik_custom/views/users.xml b/indoteknik_custom/views/users.xml
index 020d8ddc..6519aeaa 100644
--- a/indoteknik_custom/views/users.xml
+++ b/indoteknik_custom/views/users.xml
@@ -14,6 +14,8 @@
<field name="is_logistic_approver"/>
<field name="is_editor_product"/>
<field name="is_admin_reconcile"/>
+ <field name="is_outbound"/>
+ <field name="is_inbound"/>
</field>
</field>
</record>