Odooers论坛

欢迎!

该社区面向专业人士和我们产品和服务的爱好者。
分享和讨论最好的内容和新的营销理念,建立您的专业形象,一起成为更好的营销人员。


0

Add secondary address field to contacts ...

形象
odoo
形象
丢弃
2 答案
0
形象
odoo
最佳答案

Hi,


In Odoo, contact addresses are designed to inherit from the parent company by default, which can be confusing if your company has multiple physical locations. Adding a secondary or physical address is the right solution, but recreating Odoo’s built-in address layout in Studio isn’t straightforward because the standard address block uses a special widget that groups and formats the fields together.


When you add new fields in Studio, such as street, city, state, and country, they behave as standalone inputs without the dropdowns or validation that the default address block provides. You can still create your own fields like x_physical_street, x_physical_city, and x_physical_country_id, group them under a “Physical Address” section, and arrange them manually, but the result won’t have the same compact formatting.


To replicate the exact look and behavior of Odoo’s default address section, you’d need to go beyond Studio and create a small custom module. This custom module can reuse Odoo’s address widget in the form view, allowing the secondary address fields to have the same layout, dropdown menus, and validation as the main address block.


Hope it helps

1 备注
形象
丢弃
形象
odoo
-

That makes sense. Thanks for validating my perspective.

How do I group the fields? I keep seeing tutorials online that say to drag a group into the area and then drop the fields into a group, but I can find nothing in Studio that is a "group" container, nor a way of "grouping" several fields together under a single heading.

0
形象
odoo
最佳答案

What you are seeing is the DEFAULT address for the Contact you are adding.

Just change it to the address you need, we do this for convenience but you are free to change from the default to the actual address if it is different.

3 注释
形象
丢弃
形象
odoo
-

I tried that, but if I change any of the warehouse contacts when they're attached to the parent company, it changes the parent company address and all other linked locations to the same address. It's a whole parent/child relationship thing ... apparently this is for inventory/accounting purposes. If they're not linked in that way, inventory and accounting reports see each location as a separate company, and not part of the parent company. Our company has almost 50 separate physical locations (offices, warehouses, retail stores), so it would be a nightmare from a reporting perspective if they weren't all linked to the parent company.

Best I can tell, the solution is just to add more fields to record the "physical address" that's not tied to broader functionality in the system.

Still working that part out.

形象
odoo
-
形象
odoo
-

So, I'm working with a completely vanilla version of Odoo, just signed up for it 2-days ago.

Odoo defaults to "company" when creating a new contact. I can apparently change the default in developer mode, but I'm not sure I want to.

Your linked post discusses "subsidiaries", or a corporate entity owned by a primary corporate entity (Global corporation holds all shares in US corporation). In this case your solution makes sense, as they're separate companies that will report everything separately.

In our case, our locations are not separate corporate entities, but properties owned by the parent company. Thus the accounting and inventory data must flow between locations as if they where one.

The parent/child relationship is good, I just need to record the physical address along with the listing, so we humans can reference it later.