Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
1 Odpowiedz
5125 Widoki

On OpenERP 6.1, Sales -> Address Book -> Customer, Salesman should see customer only, how to isolate suppliers information from sale group, and search customer without touching supplier, "clear" button will not show suppliers as well. How to archieve this? Thanks for share!

Awatar
Odrzuć
Najlepsza odpowiedź

Create a domain on the action that opens that customer list view, that will supercede your search filter domains. You can quickly see this by going into debug mode, clicking on Sales -> Address Book -> Customers, then going to the debug dropdown and selecting "Edit Action". For the domain field, enter [('customer','=',1)] and save it. Now no matter what filters you choose, only customers show up.

To make that change last, you'd need to write some custom code to put that domain into the action XML. Something as simple as this would do it (because you're referring to the already existing action and only writing one change - the domain - and not re-writing the same info that's already there):

<record id="base.action_partner_form" model="ir.actions.act_window">
    <field name="domain">[('customer','=',1)]</field>
</record>

This makes your filter buttons pointless though, so you might want to get rid of those if you really want to go down this route.

Awatar
Odrzuć
Autor

I have tested with Sales -> Customer, it works good. This also works with Purchase which I set the domain [('supplier','=',1)]. Thanks for sharing, very appreciated!

Brett, where can i find the action XML to edit which is linked to this customer?

Powiązane posty Odpowiedzi Widoki Czynność
1
maj 23
5468
2
lis 17
11861
1
mar 15
7117
1
mar 15
4089
1
mar 15
3785