summaryrefslogtreecommitdiff
path: root/fixco_custom
diff options
context:
space:
mode:
Diffstat (limited to 'fixco_custom')
-rw-r--r--fixco_custom/models/account_move.py10
-rw-r--r--fixco_custom/views/account_move.xml3
2 files changed, 12 insertions, 1 deletions
diff --git a/fixco_custom/models/account_move.py b/fixco_custom/models/account_move.py
index 6315b6e..09e4e45 100644
--- a/fixco_custom/models/account_move.py
+++ b/fixco_custom/models/account_move.py
@@ -56,6 +56,16 @@ class AccountMove(models.Model):
# 'purchase.order.line',
# string='Auto Complete (PO Item)',
# )
+ partner_compute = fields.Char(
+ string='Partner Compute',
+ compute='_compute_partner_compute',
+ )
+
+ @api.depends('line_ids.partner_id')
+ def _compute_partner_compute(self):
+ for move in self:
+ partners = move.mapped('line_ids.partner_id.name')
+ move.partner_compute = ', '.join(partners)
def action_open_po_item_wizard(self):
self.ensure_one()
diff --git a/fixco_custom/views/account_move.xml b/fixco_custom/views/account_move.xml
index 1327e77..f0ae0bc 100644
--- a/fixco_custom/views/account_move.xml
+++ b/fixco_custom/views/account_move.xml
@@ -178,7 +178,8 @@
<field name="model">account.move</field>
<field name="inherit_id" ref="account.view_move_tree"/>
<field name="arch" type="xml">
- <field name="state" position="after">
+ <field name="name" position="after">
+ <field name="partner_compute" optional="hide"/>
<field name="efaktur_id" optional="hide"/>
</field>
</field>