Community: Framework mailing list archives

expert-framework@mail.odoo.com

Re: Enhancment proposal, new domain operator "parent_of"

by
Anders Wallenquist
- 05/10/2015 11:08:47
+1

Den 2015-05-09 14:07, zahid jalal skrev:
<blockquote cite="mid:CAOr_6AMdwCKW39zu8gwJWDb+ki+GW=25i6GZxXqRESz_+0s0_A@mail.gmail.com" type="cite">
+1. 
Good idea,


SSLL, Intégrateur Odoo.
Intégration de Services.
BI and IT consulting.
j.zahid@auriumtechnologies.com
tél  0661360233 - 0636898882
fax 0528215738

On Sat, May 9, 2015 at 12:24 PM, Pedro Manuel Baeza Romero <pedro.baeza@gmail.com> wrote:

Very good enhancement indeed.

+1

El 09/05/2015 12:23, "Caudal Eric" <caudaleric@gmail.com> escribió:

+1

Eric Caudal

On May 9, 2015 6:12 PM, "Mohammad Alhashash" <alhashash@alhashash.net> wrote:

I'd like to purpose a new operator "parent_of" with similar semantics to "child_of" operator but it would traverse parents instead of children.

Here is an implementation based on master:
https://github.com/alhashash/odoo/tree/master-new_operator_parent_of

If the concept is accepted, I'll add unit tests and documentation updates to make a pull request.

There are several use cases for this operator. For example, I need to allow child companies to inherit partners and products from parent companies, but not siblings or cousins. So, when product or partner is defined on a company, it will be limited to this company and its children.

To implement this without "parent_of" operator, we have to hard code domains for each company. But, using "parent_of", it would be very simple For example, in order or invoice, partner_id would have a domain "[('company_id', 'parent_of', company_id)]". Record rule would be simple too.


Kindly, check the mentioned branch and add comments here or at the commit:
https://github.com/alhashash/odoo/commit/7da82eab9d8c8f4dc2699f8d5b79a86aacec83fc

Regards,

Mohammad Alhashash

_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-framework-62
Post to: mailto:expert-framework@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe

_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-framework-62
Post to: mailto:expert-framework@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe

_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-framework-62
Post to: mailto:expert-framework@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe


_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-framework-62
Post to: mailto:expert-framework@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe