Message 22042

Author
albertca
Date
2015-07-30.16:56:35
Message id
22042

Content

I reviewed the patches but there's something I don't quite like and it is that we just replace the "Property" by a "Function". That is also how we did some of the modules in bitbucket but I think in fact the current UX is not good and we should remove the idea of getting the values out of the user's context.

The problems we see are:

- There is no way for the user to know if a value in the party (or product or whatever) depends on the company or not.
- The user must switch company in order to create an invoice/sale/whatever for another company. Some organizations can easily have +5 companies with very few users which makes current UX less than convenient.

Our idea was to replace Property fields by a One2Many field in party which is explicitly shown to the user (and he has no "current company" anymore). (Where I say "party" read "any model with properties"). Something like:

class Party:
    __name__ = 'party.party'
    company_properties = fields.One2Many('party.company', 'party', 'Per Comapany Properties')


class PartyCompany:
    __name__ = 'party.company'
    party = fields.Many2One('party.party', 'Party', required=True)
    company = fields.Many2One('company.company', 'Company', required=True)
    customer_payment_term = fields.Many2One('account.invoice.payment_term', 'Customer Payment Term', domain=[('company', '=', Eval('company'))])
    supplier_payment_term = fields.Many2One('account.invoice.payment_term', 'Supplier Payment Term', domain=[('company', '=', Eval('company'))])

In party_form.xml:

<page string="Company Properties">
    <field name="company_properties" colspan="4"/>
</page>


What do you think?
History
Date User Action Args
2015-07-30 16:56:36albertcasetmessageid: <1438268196.53.0.118397072346.issue2349@tryton.org>
2015-07-30 16:56:36albertcasetrecipients: + ced, ohuisman, eric, resteve, pokoli, angel, guillemNaN, unicode2013
2015-07-30 16:56:36albertcalinkissue2349 messages
2015-07-30 16:56:35albertcacreate

Showing 10 items. Show all history (warning: this could be VERY long)