Skip to content

[18.0] partner_firstname: Observations #2268

@CRogos

Description

@CRogos

Module

partner_firstname + odoo base

Describe the bug

There are currently several limitation extending the partner form. There are also some inconsistencies and limitations in odoo base which makes it hard to extend res.partner form multiple times.

  1. Firstname and Lastname is added invoice/delivery/other address
    In Odoo, only the contact type has Tital and Job Position available. Therefore firstname/lastname should only be added to contact?
Image Image
  1. There are modules, which add contact types:
    account_followup (EE)
    l10n_es_edi_facturae (CE)
    Both should not have a firstname/lastname in my opinion.
    But there might also be modules, which should have firstname/lastname. e.g. We have a custom module, which adds a type "Contact Address" which has should be a "Contact" but with an editable address. But I do not want to add a dependency to partner_firstname, because this module can also be used on databases without firstname/lastname.

  2. Limitation to extend view_partner_form from multiple modules:
    If you want to adapt the visibility of an field. e.g. function, because it should also be displayed on "Contact Address", you can overwrite it with an xml view from one module, but if you have another module, which needs to overwrite the same value again, this is not possible.

  3. Required Fields is not working
    Doesn't matter which setting I choose, setting firstname or lastname is sufficent, evenn First Name and Last Name is required.

Image

Even worse, the visibility of function is not consistent within the odoo code view. (nightmare)
In the main form it is:
<field name="function" placeholder="e.g. Sales Director" invisible="is_company"/>

and further below it is:
<field name="function" placeholder="e.g. Sales Director" invisible="type != 'contact'"/>

To Reproduce

Affected versions:
18.0 and other

Expected behavior
We should add a base cleanup module, which introduce calculated fields, that can be overloaded. All views should only link to one attribute.
If we can find/agree on a solution, I could do the coding.

Additional context
Of cause part 3 should be best fixed in odoo base, but no success so far...
odoo/odoo#209101
odoo/odoo#231581

cc: @legalsylvain , @remi-filament

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions