This question has been flagged
1 Reply
5537 Views

Hello,

I have several outsides sales reps that need to be given credit for their customer accounts but they are not ever going to be active users of the database. I've looked everywhere to try to assign them but it asks that they be made into users. Is there something I'm missing here?


Thanks.

Avatar
Discard
Best Answer

If all you want to do is store the rep, and the rep is already in your system (ideally as an employee), then you can just add a field to store that information.

The instructions that follow are upgrade safe, meaning this change will persist during database upgrades (including to the next version of Odoo)


1.  Activate Developer Mode

2.  Navigate to Settings --> Technical --> Database Structure --> Models

3.  Search for and open the Sales Order model 

4.  Click EDIT, scroll to the bottom, click Add an Item

5.  Give the new field a name, something like x_outside_sales_rep

6.  Give it a Field Label, something like Outside Sales Rep

7.  The Field Type would be many2one

8.  The Object Relation would be hr.employee (if reps are stored as Employees) or res.partner (if reps are stored as Contacts)



9.  Click Save and Close, then Save


This adds the field to the Database.


10.  Navigate to Settings --> Technical --> User Interface --> Views

11.  Search for and open the sale.order.form view

12.  From the Action menu, select Duplicate

13.  Change the View Name to sale.order.form.custom

14.  Click Save then Edit

15.  Change the View Inheritance mode to Extension View

16.  Change Inherited View to sale.order.form

17.  Delete the contents of Architecture and replace with:

<data>
    <field name="user_id" position="after">
        <field name="x_outside_sales_rep"/>
    </field>
</data>



18.  Click Save


This adds the field to the User Interface.




EDIT: I realized you were asking to store this information on the Customer record - in step 11 just use res.partner.form (base.view_partner_form) instead.

Avatar
Discard
Author

Thanks again Ray. Are there folks out there that can be hired to do tasks like this? I'm also wanting to bring in my ship to addresses from quickbooks and looks like that may have a similar correction method.

https://www.odoo.com/partners - I would recommend calling a few Partners to find one you are comfortable working with.