Skip to content

Commit

Permalink
fix emails for requisition proposal
Browse files Browse the repository at this point in the history
  • Loading branch information
Kev-Roche committed Sep 4, 2023
1 parent 902d259 commit d674918
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 9 deletions.
8 changes: 2 additions & 6 deletions purchase_requisition_proposal/data/data.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,7 @@
<field
name="subject"
>${object.company_id.name} Call for Proposals (Ref ${object.name or 'n/a' })</field>
<field
name="partner_to"
>${','.join([str(partner.id) for partner in object.company_to_call_ids.partner_id]}</field>
<field name="use_default_to" eval="True" />
<field name="body_html" type="xml">
<div style="margin: 0px; padding: 0px;">
<p style="margin: 0px; padding: 0px; font-size: 13px;">
Expand Down Expand Up @@ -106,9 +104,7 @@
<field
name="subject"
>${object.company_id.name} Closed Call for Proposals (Ref ${object.name or 'n/a' })</field>
<field
name="partner_to"
>${','.join([str(partner.id) for partner in object.company_to_call_ids.partner_id]}</field>
<field name="use_default_to" eval="True" />
<field name="body_html" type="xml">
<div style="margin: 0px; padding: 0px;">
<p style="margin: 0px; padding: 0px; font-size: 13px;">
Expand Down
4 changes: 2 additions & 2 deletions purchase_requisition_proposal/models/purchase_requisition.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,15 @@ class PurchaseRequisition(models.Model):
string="Qty",
)

@api.depends("exclusive")
@api.depends("exclusive", "multi_company_selection", "type_id.company_to_call_ids")
def _compute_company_to_call_ids(self):
for rec in self:
if (
rec.exclusive == "proposals"
and rec.type_id.multi_company_selection != "no"
):
if rec.type_id.multi_company_selection == "selected":
rec.company_to_call_ids = rec.type_id.company_to_call_ids
rec.company_to_call_ids = [(6, 0, rec.type_id.company_to_call_ids.ids)]
else:
rec.company_to_call_ids = rec.env["res.company"].search(
[("id", "!=", rec.company_id.id)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@
name="action_create_quotations"
string="Create proposal Quotations"
type="object"
states="open, done"
class="btn-primary"
/>
<button
Expand Down

0 comments on commit d674918

Please sign in to comment.