This is needed to solve an inheritance problem when adding a superclass
`base.model` (I guess this is related to the fact some code in the orm
does a copy from the class to the instance).
bzr revid: vmt@openerp.com-20130416132621-xo0lckimczqpvyos
This prevents hiding real data and also allows creating more
complex/flexible structures by setting the values of these
fields before or after setting is_company, to reach the
desired result.
bzr revid: odo@openerp.com-20130416093403-9m484d30qqq5ab8l
If there are no grouping field specified *but* group_by_no_leaf is
specified, should call read_group with no grouping fields: will
generate a single group (which can not be opened) for all of the
model.
Necessary for analysis views since individual "records" make no sense.
bzr revid: xmo@openerp.com-20130416092344-2pqog8f7xprn6hsh
This is not necessary for the `is_customer` flag, as it is
always True by default (customers are created more frequently).
Passing the field value via an invisible field in the mini
contact form is necessary because context `default_*` values are
automatically discarded by the ORM when creating o2m
or m2m records (as they are supposed to apply to a different model).
bzr revid: odo@openerp.com-20130416091027-y7iwvpjhowg53lry
html fields are sanitized just before saving data into the database.
In the composer, this cause the sanitization of the templated
message (for mass mailing messages) before the rendering, forbidding
the use of templated html links.
The html of the message is sanitized by message_post()
bzr revid: chs@openerp.com-20130416083812-jvqeivfxhdr32djh
- res.partner must prevent creating loops in partner
hierarchies, and this can be done easily with an
extra _constraint using the ORM's builtin _check_recursion
- _check_recursion's implementation incorrectly
assumed that the provided 'ids' were unrelated
(not part of a common hierarchy).
- add tests for _check_recursion via extra
tests on res.partner structure
(explains why both patches are in the same
commit)
bzr revid: odo@openerp.com-20130415181108-b2ytpuxflr8srpqf
With the 7.0 model all accounting-related fields are synchronized
from company to contacts (both are res.partner records), so the
unique check is not a trivial unique constraint. It must be updated
to use a *partial unique index* that applies only to "commercial
entities" and not to contacts. The condition for being a commercial
entity is "is_company is true or parent_id is NULL".
If companies have unique vat/nrc numbers, then their contacts
will be consistent because they are automatically synchronized,
so the uniqueness between contacts does not have to be checked.
(The auto-sync is performed by res.partner automatically and covered
by tests in the "base" module)
bzr revid: odo@openerp.com-20130415175258-l15meqin80sbhggu
- res.partner must prevent creating loops in partner
hierarchies, and this can be done easily with an
extra _constraint using the ORM's builtin _check_recursion
- _check_recursion's implementation incorrectly
assumed that the provided 'ids' were unrelated
(not part of a common hierarchy).
- add tests for _check_recursion via extra
tests on res.partner structure
(explains why both patches are in the same
commit)
bzr revid: odo@openerp.com-20130415171732-aj3j2e2mycvzf4kp
super() finds the MRO parent of the provided class to resume the
execution chain from there, so the class being defined should be
provided.
Here view called super(osv.osv, self).create so if osv.osv (Model) had
a create() defined (which luckily it does not) it would've been
skipped.
bzr revid: xmo@openerp.com-20130415105744-cfx47t01oc7loyes
project: privacy_visibility now has basically 'public', 'employees' and 'followers' possible values.
portal_project: add 'portal' to the privacy_visibility values
- public: everybody see the project and all tasks
- portal: employees see the project and all tasks; portal users see the project and the followed or assigned tasks
- employees: employees see the project and all tasks
- followers: employees see the project if follower and the follower or assigned tasks
portal_project, portal_project_issue: added tests for access rights
bzr revid: tde@openerp.com-20130415083130-buklyo8kdpzrbzb7