diff options
| author | Indoteknik . <it@fixcomart.co.id> | 2025-06-11 09:14:42 +0700 |
|---|---|---|
| committer | Indoteknik . <it@fixcomart.co.id> | 2025-06-11 09:14:42 +0700 |
| commit | a6629db53b6080bd2217e426b434c2ecc72588ab (patch) | |
| tree | 75c27a31f9932834911d8d84b2b0c00a822e792b | |
| parent | 503fb1e0adb8eca300133bde10a4bbd8e16d2cb5 (diff) | |
(andri) add button INFORMATION DETAIL pada popup detail contact & addresses
| -rw-r--r-- | indoteknik_custom/models/res_partner.py | 10 | ||||
| -rw-r--r-- | indoteknik_custom/views/res_partner.xml | 9 |
2 files changed, 19 insertions, 0 deletions
diff --git a/indoteknik_custom/models/res_partner.py b/indoteknik_custom/models/res_partner.py index fee0e73b..b8bdfe22 100644 --- a/indoteknik_custom/models/res_partner.py +++ b/indoteknik_custom/models/res_partner.py @@ -525,6 +525,16 @@ class ResPartner(models.Model): if self.company_type == 'person': self.nama_wajib_pajak = self.name + def action_open_full_form(self): + return { + 'type': 'ir.actions.act_window', + 'name': 'Partner', + 'res_model': 'res.partner', + 'res_id': self.id, + 'view_mode': 'form', + 'target': 'current', + } + def geocode_address(self): for rec in self: # Ambil nama dari relasi (Many2one) atau gunakan nilai default diff --git a/indoteknik_custom/views/res_partner.xml b/indoteknik_custom/views/res_partner.xml index 5ca61834..468de1d5 100644 --- a/indoteknik_custom/views/res_partner.xml +++ b/indoteknik_custom/views/res_partner.xml @@ -88,6 +88,15 @@ <field name="main_parent_id" invisible="1" /> <field name="site_id" attrs="{'readonly': [('parent_id', '=', False)]}" domain="[('partner_id', '=', main_parent_id)]" context="{'default_partner_id': active_id}" /> </xpath> + <xpath expr="//field[@name='child_ids']/form/sheet/group" position="after"> + <div class="oe_left" style="margin-top: 16px;"> + <button name="action_open_full_form" + type="object" + string="Detail Information" + class="btn btn-primary" + /> + </div> + </xpath> <xpath expr="//field[@name='property_payment_term_id']" position="attributes"> <attribute name="readonly">0</attribute> </xpath> |
