Skip to Content
Menu
This question has been flagged
5 Replies
2922 Views

Hello,

I try Odoo 13 enterprise and found that salesperson cannot sell rental product if create quotation from opportunity view. Is there is way allow user to create rental order from CRM? and i need why sales orders and rental order is separate app although has same model and features?

Avatar
Discard
Best Answer

It's available in the Odoo 14 enterprise module sale_renting_crm.

You could try to install it and use it in Odoo 13 enterprise but it's not directly available in that version. It's a simple module so it wouldn't take so much effort to make it work in Odoo 13 enterprise, maybe None

Avatar
Discard
Best Answer

I see that it is possible to create Rental Order from Opprtunity screen in CRM, may be it was added in recent months.

Avatar
Discard
Best Answer

hello


Avatar
Discard
Best Answer

You can do it, but with a little of code.


Create a method like this, calling the rental action:

def action_view_rent_quotation(self):
action = self.env.ref('sale_renting.rental_order_action').read()[0]
action['context'] = {
'default_is_rental_order': 1,
'search_default_from_rental': 1,
'search_default_draft': 1,
'search_default_partner_id': self.partner_id.id,
'default_partner_id': self.partner_id.id,
'default_opportunity_id': self.id
}
action['domain'] = [('opportunity_id', '=', self.id), ('state', 'in', ['draft', 'sent'])]
quotations = self.mapped('order_ids').filtered(lambda l: l.state in ('draft', 'sent'))
if len(quotations) == 1:
action['views'] = [(self.env.ref('sale_renting.rental_order_primary_form_view').id, 'form')]
action['res_id'] = quotations.id
return action

Then add a button like this:

<xpath expr="//button[@name='action_view_sale_quotation']" position="after">
<button string="Rentals" class="oe_stat_button" type="object" name="action_view_rent_quotation" icon="fa-retweet"/>

</xpath>




Avatar
Discard
Best Answer

I think from CRM is not possible to create rental orders, but if you want to link the quotation made in the Rental App to a opportunity in CRM you can do that in the tab Other Infor field Opportunity. 

Avatar
Discard