Commit Graph

4808 Commits

Author SHA1 Message Date
Xavier Morel de13720f0e [IMP] rng of field tag in data xml
also fix nonsensical XML files specifying @ref and @model

bzr revid: xmo@openerp.com-20130429122423-qubsy2ccwo5tb8bq
2013-04-29 14:24:23 +02:00
Olivier Dony ffebb64472 [MERGE] Forward-port of 7.0 fixes up to rev. 4961
rev-id odo@openerp.com-20130425171238-dhgpqbi9nio12vxk

bzr revid: odo@openerp.com-20130424131936-5eb7omkz51arnm81
bzr revid: odo@openerp.com-20130425171444-ycu89d2393f8nnxm
2013-04-25 19:14:44 +02:00
Olivier Dony 20020a7647 [FIX] res.partner: typo would prevent contact from using company address correctly if flag changed without changing/setting company + updated tests to cover this
bzr revid: odo@openerp.com-20130425171238-dhgpqbi9nio12vxk
2013-04-25 19:12:38 +02:00
Olivier Dony c8e8860d08 [FIX] res.partner: make use_parent_address field visible if set, even if parent is missing
This should not be needed but in the initial 7.0 branch
the default for use_parent_address was True so it was
set even on partners that had no parent company.
Now that the fields are read-only when that option
is enabled, it makes the address impossible to
edit. At least by making it visible we give the
user the opportunity of fixing it manually.

Can also be fixed at once with a single SQL
query:
UPDATE res_partner set use_parent_address = false
       WHERE parent_id IS NULL;

bzr revid: odo@openerp.com-20130425163916-ou7jjr6xbopfwvrc
2013-04-25 18:39:16 +02:00
Launchpad Translations on behalf of openerp 83fb6fbf02 Launchpad automatic translations update.
bzr revid: launchpad_translations_on_behalf_of_openerp-20130425060541-r1eqpc1djb3vy953
bzr revid: launchpad_translations_on_behalf_of_openerp-20130425060609-9otf0125cci1hjvi
2013-04-25 06:06:09 +00:00
Olivier Dony 0ee404c054 [FIX] res.partner: always call write() with a list of IDs, a single ID is not valid! (even if it works sometimes)
bzr revid: odo@openerp.com-20130424131625-aeljtyo5yuiyrlcz
2013-04-24 15:16:25 +02:00
Quentin (OpenERP) 01a3c67183 [REV] revert of commit 4953 that was not appropriate for a stable version. Will be back in trunk
bzr revid: qdp-launchpad@openerp.com-20130424093403-9dk8yap427kbndzi
2013-04-24 11:34:03 +02:00
Launchpad Translations on behalf of openerp 26e488f2fb Launchpad automatic translations update.
bzr revid: launchpad_translations_on_behalf_of_openerp-20130424052821-pkggcy9qr4rmhl53
bzr revid: launchpad_translations_on_behalf_of_openerp-20130424052845-9nzv2aje2g99c9eq
2013-04-24 05:28:45 +00:00
Antony Lesuisse 6a2e96bf90 [FIX] workers, listen backlog based on the number of workers
bzr revid: al@openerp.com-20130423222245-i3gw87v7rktsb23y
2013-04-24 00:22:45 +02:00
Christophe Simonis 60f0bd08ee [FIX] expression: allow creating child_of expression even if "id" field has been redefined, courtesy of Gustavo Adrian Marino
lp bug: https://launchpad.net/bugs/1030942 fixed
lp bug: https://launchpad.net/bugs/1131992 fixed

bzr revid: chs@openerp.com-20130423181926-yk628txd6yiybtko
2013-04-23 20:19:26 +02:00
Quentin (OpenERP) a98ae1d753 [IMP/FIX] ir_model_data: added check_object_reference() in order to return a value only if the uid has read access on the targeted object. It avoids raising access rights errors further in the process and prevents duplicating that same code in all addons
bzr revid: qdp-launchpad@openerp.com-20130423103706-u4wk2y65kam587c6
2013-04-23 12:37:06 +02:00
Launchpad Translations on behalf of openerp 6b04a532b8 Launchpad automatic translations update.
bzr revid: launchpad_translations_on_behalf_of_openerp-20130423060902-2j8xouki50aemi14
bzr revid: launchpad_translations_on_behalf_of_openerp-20130423061017-5os2p9ztugb6jjph
bzr revid: launchpad_translations_on_behalf_of_openerp-20130423061019-n2660taj1o9os75c
2013-04-23 06:10:19 +00:00
Olivier Dony 41146460c0 [FIX] rml2html: incorrect license headers in some source files, reported and contributed by Alec Leamas
Mixing LGPL 2.1 and AGPL 3.0 in the same source file
is incorrect, and the AGPLv3 license was added by
mistake: keep only LGPL license and preserve
copypright info.

lp bug: https://launchpad.net/bugs/1167034 fixed

bzr revid: odo@openerp.com-20130422170420-in1wo45v3q8q0fhr
2013-04-22 19:04:20 +02:00
Launchpad Translations on behalf of openerp d88a20ecf8 Launchpad automatic translations update.
bzr revid: launchpad_translations_on_behalf_of_openerp-20130419052412-h26bmq8wdgeqmbtl
bzr revid: launchpad_translations_on_behalf_of_openerp-20130421043759-n50olbu0m98tgdcn
2013-04-21 04:37:59 +00:00
Quentin (OpenERP) 9a21f819b6 [FIX] ir_translation: fixed erro 'context_wo_lang is not defined'
bzr revid: qdp-launchpad@openerp.com-20130418114627-unmfdu6010hyc8xx
2013-04-18 13:46:27 +02:00
Quentin (OpenERP) 96a60e42c6 [FIX] ir_translation: fix in new methods made to improve the usability, see previous commit
bzr revid: qdp-launchpad@openerp.com-20130417121718-jfwi2f3gn0tum9xa
2013-04-17 14:17:18 +02:00
Launchpad Translations on behalf of openerp 6a2da1c2f7 Launchpad automatic translations update.
bzr revid: launchpad_translations_on_behalf_of_openerp-20130421053215-jdbdrur8vk4zu5tc
bzr revid: launchpad_translations_on_behalf_of_openerp-20130420064852-b6bt9syb79h1x16m
bzr revid: launchpad_translations_on_behalf_of_openerp-20130421053233-g4dbsfidsqrs301v
bzr revid: launchpad_translations_on_behalf_of_openerp-20130421053237-8jhzy2qe55bb766x
2013-04-21 05:32:37 +00:00
Quentin (OpenERP) 7fda7e1dbd [FIX] ir_sequence: the field company_id does not exist in res.company, and thus cannot be used as sorting criterion in search()
bzr revid: qdp-launchpad@openerp.com-20130419154920-ipddx1mszl2c5az4
2013-04-19 17:49:20 +02:00
Quentin (OpenERP) d621d26516 [FIX] orm, _generate_order_by(): allow to order by LOG_ACCESS_COLUMNS even if the column is not defined again in self._columns. Raising an error instead of silently skipping the order_by
bzr revid: qdp-launchpad@openerp.com-20130419145417-2tix8ynmx51qiqkf
2013-04-19 16:54:17 +02:00
Launchpad Translations on behalf of openerp 6a600ff311 Launchpad automatic translations update.
bzr revid: launchpad_translations_on_behalf_of_openerp-20130420064840-ctlb3ywgmfytczfj
2013-04-20 06:48:40 +00:00
Olivier Dony 360b549677 [MERGE] res.partner: many important fixes for contact/company management and address management, see bug 1160365
- Fix autosync of accounting/invoicing-related fields on contacts, just as if they were actually modeled as fields.related to the parent commercial entity. This starts with the addition of the new functional field `commercial_partner_id`, to locate the commercial entity for any partner. The commercial entity is defined as the first ancestor (starting at the partner itself) that is either marked `is_company` or has no parent.

- Corrected autosync of address fields (bug 1160425). Also included in the same patch, because those two mechanisms are closely related and share some parts of the implementation. "use_parent_address" now defaults to False, and auto-sync only happens downstream, except for a special case when creating a new company and a new contact at the same time

- `is_company` does not reset the parent_id field anymore, to allow for multi-level structures. The `parent_id` field now also stays visible if it has a non-empty value

- the `email`, `phone`, `fax`, `mobile`, `lang`, etc. that were sometimes synced when changing parent company are now properly left alone

- res.partner.address_get() now defaults to the partner being looked up rather than company when no match is found at all and no "default" exists. This avoids losing the contact info on invoices when a new contact+company pair is created.

- the embedded contact creation mini-form was updated to include the address fields and the `type` field

- res.partner.name_get now return "Company, Contact" rather than "Contact (Company)" to make it clearer that the company is selected as well.

- Added warning message when changing the Company of a Contact that already has a company, so it is clear that it should only be done if the Company was incorrect - in other cases a new contact must be created under the new company.

- Fixed search domains using "child_of" to also include deactived records, so that using this operator in the search view of business documents returns the expected results.

- fixed propagation of "is_supplier" flag when creation a parent company for a contact created on the fly on a Purchase Order, and when adding contacts to an existing Supplier Company

lp bug: https://launchpad.net/bugs/1160365 fixed
lp bug: https://launchpad.net/bugs/1122363 fixed
lp bug: https://launchpad.net/bugs/1160425 fixed

bzr revid: odo@openerp.com-20130420032529-pvv6vuelp84bt26j
2013-04-20 05:25:29 +02:00
Olivier Dony 16b38a053a [FIX] res.partner: fix invisible attrs on Contacts tab, empty o2m field results in `[]`, not `False`
bzr revid: odo@openerp.com-20130420004713-0cblmquf4t6i2n0r
2013-04-20 02:47:13 +02:00
Olivier Dony 18ee18244f [FIX] test_expression: assertion was too sensitive to exact parameters
Now that res.partner.child_ids has an extra domain
attribute the exact number of parameters of queries
using `child_ids` in the WHERE clause is different.

bzr revid: odo@openerp.com-20130419173159-ef1onm3823hsi77n
2013-04-19 19:31:59 +02:00
Olivier Dony 9b9c3fa59c [FIX] res.partner.name_get: partners marked as "is_company" should appear as standalone
This is more consistent with the way we expect reporting
to work, and will also ensure that these companies
appear right above their contacts in search order
(which will match name_get)

bzr revid: odo@openerp.com-20130419164728-25312wtyzt9h6egw
2013-04-19 18:47:28 +02:00
Olivier Dony 83feb1c46f [REVERT] res.partner: undo change of ordering in name_search result, to be addressed via a stored display_name field (temporarily added by account_report_company module in 7.0)
bzr revid: odo@openerp.com-20130419164447-wrmfghxi44au3273
2013-04-19 18:44:47 +02:00
Olivier Dony cfb53f1aad [FIX] res.partner: search using 'child_of' should include inactive children
This is necessary for 2 reasons:
- when searching on Business documents the search domain will be
  [('partner_id', 'child_of', 'ACME')] in order to match all
  descendants, and it must match inactive children as well
- in other cases like for resolving IDs to update via store
  triggers, it is necessary that 'child_of' returns inactive
  children too.

The implementation is tricky because the ORM automatically 
transform 'child_of' domains into recursive searches with
[('parent_id', 'in', ids)], which is the same query that the
reverse one2many 'child_ids' will also use to find contacts.
The overridden search() therefore matches this domain pattern
only when there is one criterion (to avoid side-effects in
other cases) and a dummy extra 'domain' was added to the
definition of the 'child_ids' o2m so it won't match.
The net result is that child_ids will not return inactive
children while child_of will return all descendants when
it is the only criterion. This is the expected behavior
whenever child_of is used on res.partner, because
it's safer to always show business documents.
The only side-effects will be for custom/manual search
calls with a single criterion of the form ('parent_id','in', x)
and those can be fixed by adding an extra domain
component ('active','=',True), just like child_ids does.

bzr revid: odo@openerp.com-20130419135756-2kbhwr23lygqdoob
2013-04-19 15:57:56 +02:00
Launchpad Translations on behalf of openerp 230b23e6cb Launchpad automatic translations update.
bzr revid: launchpad_translations_on_behalf_of_openerp-20130419061733-j4th561m2dju73zo
bzr revid: launchpad_translations_on_behalf_of_openerp-20130419061748-4sz8agg8laqbyu4p
2013-04-19 06:17:48 +00:00
Olivier Dony 3c5559045c [FIX] res.partner: add onchange warning when changing an existing contact's company
bzr revid: odo@openerp.com-20130418153829-rmkd6xo1cajgfer5
2013-04-18 17:38:29 +02:00
Olivier Dony dfbe68e69d [IMP] res.partner: rename commercial_id to commercial_partner_id + make function field inheritable
The name `commercial_partner_id` better reflects its
purpose and the fact that it is a FK to a partner.


An extra indirection through a lambda function was
also added to the definition of the function field
to make it possible to override it in other modules
(otherwise the function is passed by copy directly
and cannot be inherited later)

bzr revid: odo@openerp.com-20130418144533-owupfwn6h83q432x
2013-04-18 16:45:33 +02:00
Antony Lesuisse 4f87484805 [FIX] ir.cron add a safeguard mecanism against version mistach when polling
bzr revid: al@openerp.com-20130418010410-0zz1zkexnjzjp3si
2013-04-18 03:04:10 +02:00
Quentin (OpenERP) 5734172c71 [FIX] base, res_company: added a missing context when calling write(), apparently needed for OPW: 586824
bzr revid: qdp-launchpad@openerp.com-20130417092321-17vj33w2bp2bumo8
2013-04-17 11:23:21 +02:00
Launchpad Translations on behalf of openerp f203d2426b Launchpad automatic translations update.
bzr revid: launchpad_translations_on_behalf_of_openerp-20130417055707-rpdalm7k5efoagz6
bzr revid: launchpad_translations_on_behalf_of_openerp-20130417055742-p9nxg3t2tb0553wn
2013-04-17 05:57:42 +00:00
Olivier Dony 06cd0a1c7f [FIX] res.partner: avoid hiding `parent_id` and `child_ids` fields if they are set, irregardless of the rest of the `is_company` flag
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
2013-04-16 11:34:03 +02:00
Olivier Dony d734bf58cc [FIX] res.partner: name_get: return "Company, Contact" rather than "Contact (Company)" to make it clearer that the company is selected as well
bzr revid: odo@openerp.com-20130416093121-t5soophs2aui8rzq
2013-04-16 11:31:21 +02:00
Quentin (OpenERP) d2e71a65e1 [IMP] ir_translation: GUI improve in order to be able to change the english value of a model field (eg: a product name) directly in the translation window + small refactoring in order to test 'if context is None' rather than 'if not context' (see lp bug 525808)
bzr revid: qdp-launchpad@openerp.com-20130416091501-sgm3gdm80oxajahz
2013-04-16 11:15:01 +02:00
Olivier Dony 2c6d69e0f1 [FIX] res.partner: propagate `is_supplier` property when creating parent or child partner for a supplier
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
2013-04-16 11:10:27 +02:00
Stephane Wirtel 294e675f8b [MERGE] After the installation, reload the Apps interface if the modules are not
on the local repo of the addons.

bzr revid: stw@openerp.com-20130416080120-2xbxilnaw2j3i0lu
2013-04-16 10:01:20 +02:00
Launchpad Translations on behalf of openerp 46e5767367 Launchpad automatic translations update.
bzr revid: launchpad_translations_on_behalf_of_openerp-20130416052714-8akmv4r170byjx0k
2013-04-16 05:27:14 +00:00
Olivier Dony f985391ba0 [MERGE] Sync with 7.0
bzr revid: odo@openerp.com-20130415181836-cmq936wu0w7alwky
2013-04-15 20:18:36 +02:00
Olivier Dony 8efd16f25a [FIX] res.partner, orm._check_recursion: prevent recursive partner structures + fix false positives in check_recursion()
- 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
2013-04-15 19:17:32 +02:00
Stephane Wirtel cff29fa888 [MERGE] Upstream
bzr revid: stw@openerp.com-20130415154400-fq7ydj6q1y07n02w
2013-04-15 17:44:00 +02:00
Christophe Simonis ef062c086b [FIX] typo in method name in apps.js
bzr revid: chs@openerp.com-20130415144708-ezj5xeuo3yylb5em
2013-04-15 16:47:08 +02:00
Xavier Morel 5fd1e56566 [FIX] incorrect view in super() call
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
2013-04-15 12:57:44 +02:00
Cedric Snauwaert 56badfcb46 [REF]ir_translation: improve _get_src and _set_src function
bzr revid: csn@openerp.com-20130415100914-wm0wqhgg5mou2wxs
2013-04-15 12:09:14 +02:00
Launchpad Translations on behalf of openerp c13ceba6b9 Launchpad automatic translations update.
bzr revid: launchpad_translations_on_behalf_of_openerp-20130412060536-q07q8ed9v8ldi2kv
bzr revid: launchpad_translations_on_behalf_of_openerp-20130414055031-dgknuaf8a4dhgt16
bzr revid: launchpad_translations_on_behalf_of_openerp-20130413063110-rtd3r7hxe54yb8eq
bzr revid: launchpad_translations_on_behalf_of_openerp-20130414054933-k6o13mitp3dl62xq
bzr revid: launchpad_translations_on_behalf_of_openerp-20130415060648-klbxmc1afr5jq4vb
bzr revid: launchpad_translations_on_behalf_of_openerp-20130412060533-fq4nwi1i6h39y7pl
bzr revid: launchpad_translations_on_behalf_of_openerp-20130413063146-745583mwivnzgjqj
bzr revid: launchpad_translations_on_behalf_of_openerp-20130414055028-v2dnk713g9ydbvpo
bzr revid: launchpad_translations_on_behalf_of_openerp-20130415060722-gvarcrrppfcq777a
2013-04-15 06:07:22 +00:00
Quentin (OpenERP) 3f1d969e51 [FIX] module, technical reference guide report: don't print fields having the same name than another on another object that have been modified in that module. + small refactoring
bzr revid: qdp-launchpad@openerp.com-20130412133214-s92o4gcfwfu7yfbp
2013-04-12 15:32:14 +02:00
Quentin (OpenERP) 7f4d6299cc [FIX] res_bank: good naming of the keyword parameters of fields_get()
bzr revid: qdp-launchpad@openerp.com-20130412133008-d5l6yxm8v7in9i9x
2013-04-12 15:30:08 +02:00
Quentin (OpenERP) f354be38a3 [FIX] module, technical reference guide report: print only the that have been added, not all the fields of the modified objects
bzr revid: qdp-launchpad@openerp.com-20130412125754-qfu30oxc7yrsrrzv
2013-04-12 14:57:54 +02:00
Cedric Snauwaert 2455ef9463 [FIX]ir_translation: replace source field to show value of the term stored in db and reflect change directly
in db when changing source value

bzr revid: csn@openerp.com-20130412124914-8epmco1z37ge1oui
2013-04-12 14:49:14 +02:00
Launchpad Translations on behalf of openerp 63167859c1 Launchpad automatic translations update.
bzr revid: launchpad_translations_on_behalf_of_openerp-20130410055405-w3d7pmwo87vl44eu
bzr revid: launchpad_translations_on_behalf_of_openerp-20130411144320-1vmytr6rwujytg83
bzr revid: launchpad_translations_on_behalf_of_openerp-20130412060508-w8b9st5nhhzb0hh0
2013-04-12 06:05:08 +00:00