Welcome

View it on github.com

Business Relationship Types

License: LGPL-3

This is the Odoo 18 branch.

This module is in alpha state. Feel free to provide feedback.

Extend your contacts with business relationship types, e.g. B2C, B2B and Internal and configure automatic assignment of pricelists and fiscal positions.

Table of contents

Features

Configurable business relationship types on contact level. Usable for

  • automatic assignment of pricelists and fiscal positions

  • customize the default business relationship for new contacts

  • assign a default image, salesperson or sales team to new contacts

  • assign default salesperson and analytic account to sale orders

  • restrict website menus, pages, redirects and block visibilities to certain users

  • use different access permission groups for portal users

  • restrict product visibility to certain user groups

  • create and configure your own business relationships

  • recompute existing cart prices on login and address changes

  • individual pricelists for child contacts and sale order pricelists by shipping address

Typical use cases

Different prices for user groups

You want to offer different prices for customers like employees or agents? No problem, just create the desired pricelist with a business relationship filter.

Round prices for B2C

Odoo manages tax-excluded and tax-included prices easily, but not both together. Still, this may be your exact use case: You want to provide beautifully rounded tax-included prices for your B2C customers, but correct tax-excluded prices for other B2B transactions.

In Manage prices for B2B (tax excluded) and B2C (tax included) you find a detailed description of the problem and the documented workaround: While basically working tax-excluded, you configure separate tax-included pricelists and fiscal positions, that swap tax-excluded to tax-included. These have to be assigned manually to your special tax-included customers and it won’t work if this customer has multiple delivery addresses that differ in tax handling (e.g. tax free export).

Here business_relationships comes to the help: instead of having to assign the tax-included pricelists and fiscal position manually on each contact, you may use automatic assignment based on the business relationships.

Pricelists according to shipping address

Tax included prices come with a drawback: your client might have a delivery address in another country, that requires tax free export. The problem is, you cannot simply remove the taxes with the default configuration, because tax free means 0% on the invoice. To get things right, you will need to switch to a tax excluded pricelist, easily done with this module by setting the two options individual pricelists for child contacts and sale order pricelist by shipping address.

Usage

Set your partner’s business relationship in the contact form, right under the name. Out of the box they can be used as additional filter option for your pricelists and fiscal positions.

Automatic assignment

Under Contacts -> Configuration -> Business Relationships you can modify existing business relationships or create new ones. There is some basic configuration to assign defaults to new contacts and on app installation, but they can be freely reassigned.

There are B2B, B2C and Internal. B2B is default for companies and for contacts, that have Purchase Payment Terms set (your suppliers). Internal will be set for your employees (users of group base.group_user). All further contacts are set to B2C. The match conditions are configurable and the first matching business relationship will be assigned as default to a new contact, if and only if you do not explicitly set another one.

If you need more options, don’t hesitate to file a feature request.

Website User Types

As a website extension, you may install the auxiliary module Website User Types. After installation, users/logins will have a special access permission group according to the configuration of the business relationship of the contact, by default Group B2C and Group B2B. These groups can be used to customize the portal experience. Note, that every login can only have one type.

Tipp: you can install Website User Types Optional Interface Extensions to see and edit a user’s Website User Types more comfortably in the settings, individually on user level.

Pages, Menus and Redirects

All three models can now be restricted to arbitrary Odoo access groups, including the new ones from above. This way you can redirect your B2B (or other) customers to specific landing pages, as well as restrict menu and page accessibility to different user groups.

Block Visibility

The web editor extends the Visibility option to allow you to restrict the visibility of any configurable block to Group B2C, Group B2B or any other group of category Application Website User Types. Use it, for example, to create business relationship dependent mega menu customizations or show/hide arbitrary website blocks.

Note, these elements are simply hidden from the user, there is no additional server rendering logic involved. For more sophisticated features you might rather consider using a user group specific page or even a custom extension.

Product Accessibility

In the product form, eCommerce tab, you find the new section Website User Visibility. Use it to remove product access of one of the user groups.

When unset, users of the group will not see the product in the shop list and accessing the product page results in 404. However, internal users of group Web Designer are still able to see and access it without limit.

Bug Tracker

Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us smashing it by providing a detailed and welcomed feedback.

Credits

Authors