summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorstephanchrst <stephanchrst@gmail.com>2022-10-26 15:56:00 +0700
committerstephanchrst <stephanchrst@gmail.com>2022-10-26 15:56:00 +0700
commit780b7ce9643644bd3ea020c02d66257d85d53778 (patch)
tree36a32ae9a4eb3ccefee25a7f67dcef830a27ccf4
parent30b673c510483934e215858dc928097cd20dea21 (diff)
Update dunning_run.py, ir.model.access.csv, and dunning_run.xml
-rw-r--r--indoteknik_custom/models/dunning_run.py9
-rwxr-xr-xindoteknik_custom/security/ir.model.access.csv4
-rw-r--r--indoteknik_custom/views/dunning_run.xml50
3 files changed, 54 insertions, 9 deletions
diff --git a/indoteknik_custom/models/dunning_run.py b/indoteknik_custom/models/dunning_run.py
index dc943c23..b6531c5c 100644
--- a/indoteknik_custom/models/dunning_run.py
+++ b/indoteknik_custom/models/dunning_run.py
@@ -9,12 +9,9 @@ class DunningRun(models.Model):
number = fields.Char(string='Document No', index=True, required=True, copy=False, readonly=True)
dunning_date = fields.Date(string='Dunning Date')
partner_id = fields.Many2one(
- 'res.partner', string='Customer', readonly=True,
- states={'draft': [('readonly', False)], 'sent': [('readonly', False)]},
- required=True, change_default=True, index=True, tracking=1,
- domain="['|', ('company_id', '=', False), ('company_id', '=', company_id)]", )
- order_line = fields.One2many('dunning.run.line', 'dunning_id', string='Dunning Lines',
- auto_join=True)
+ 'res.partner', string='Customer',
+ required=True, change_default=True, index=True, tracking=1)
+ dunning_line = fields.One2many('dunning.run.line', 'dunning_id', string='Dunning Lines', auto_join=True)
dunning_level = fields.Integer(string='Dunning Level', default=30, help='30 hari sebelum jatuh tempo invoice')
diff --git a/indoteknik_custom/security/ir.model.access.csv b/indoteknik_custom/security/ir.model.access.csv
index 78e56b30..9d2137f6 100755
--- a/indoteknik_custom/security/ir.model.access.csv
+++ b/indoteknik_custom/security/ir.model.access.csv
@@ -11,4 +11,6 @@ access_purchase_pricelist,access.purchase.pricelist,model_purchase_pricelist,,1,
access_sale_monitoring,access.sale.monitoring,model_sale_monitoring,,1,1,1,1
access_sale_monitoring_detail,access.sale.monitoring.detail,model_sale_monitoring_detail,,1,1,1,1
access_delivery_order,access.delivery.order,model_delivery_order,,1,1,1,1
-access_delivery_order_line,access.delivery.order.line,model_delivery_order_line,,1,1,1,1 \ No newline at end of file
+access_delivery_order_line,access.delivery.order.line,model_delivery_order_line,,1,1,1,1
+access_dunning_run,access.dunning.run,model_dunning_run,,1,1,1,1
+access_dunning_run_line,access.dunning.run.line,model_dunning_run_line,,1,1,1,1 \ No newline at end of file
diff --git a/indoteknik_custom/views/dunning_run.xml b/indoteknik_custom/views/dunning_run.xml
index 5036b1cd..b0bf8654 100644
--- a/indoteknik_custom/views/dunning_run.xml
+++ b/indoteknik_custom/views/dunning_run.xml
@@ -14,8 +14,54 @@
</field>
</record>
+ <record id="dunning_run_line_tree" model="ir.ui.view">
+ <field name="name">dunning.run.line.tree</field>
+ <field name="model">dunning.run.line</field>
+ <field name="arch" type="xml">
+ <tree>
+ <field name="invoice_id"/>
+ <field name="date_invoice"/>
+ <field name="efaktur_id"/>
+ <field name="reference"/>
+ <field name="open_amt"/>
+ </tree>
+ </field>
+ </record>
+
+ <record id="dunning_run_form" model="ir.ui.view">
+ <field name="name">dunning.run.form</field>
+ <field name="model">dunning.run</field>
+ <field name="arch" type="xml">
+ <form>
+ <sheet string="Manufactures">
+ <div class="oe_button_box" name="button_box"/>
+ <group>
+ <group>
+ <field name="number"/>
+ <field name="partner_id"/>
+ <field name="dunning_level"/>
+ </group>
+ </group>
+ <notebook>
+ <page string="Invoices">
+ <field name="dunning_line"/>
+ </page>
+ </notebook>
+ </sheet>
+ </form>
+ </field>
+ </record>
+
+ <record id="dunning_run_action" model="ir.actions.act_window">
+ <field name="name">Dunning Run</field>
+ <field name="type">ir.actions.act_window</field>
+ <field name="res_model">dunning.run</field>
+ <field name="view_mode">tree,form</field>
+ </record>
+
<menuitem id="menu_dunning_run"
name="Dunning Run"
- action="dunning_run_tree"
- parent="account.account_reports_management_menu"/>
+ action="dunning_run_action"
+ parent="account.menu_finance_reports"
+ sequence="200"/>
</odoo> \ No newline at end of file