- guard do_load_needaction to prevent exceptions when
there is no menu to load
- avoid calling do_load_needaction where there is no
menu to reload in the first place
bzr revid: odo@openerp.com-20130503102248-vjl1b8xju9uwfq97
*uniformized the computation in multi-currency in order to always use res_currency.compute()
*make sure to pass the right conversion rate to _current_rate() function using the context if it is specified on the voucher and, in this function, used the info from the context instead of the computed one if relevant. (This involves an ugly overwriting of the 'rate' field that will disappear in trunk: to stay backward compatible and avoid any update of 'base' module it has to be done this way).
*replace the currency_id field on the voucher by a fields.function (was a fields.related) in order to always have a currency, even if it's a voucher in the company currency. (makes the treatment easier and more consistent. Less error prone)
*misc code reaftoring
bzr revid: qdp-launchpad@openerp.com-20130502225937-ya45q2wvgqy7zo1c
Backport trunk Revision:
3729 revid:chm@openerp.com-20130502122806-1i9h8v0cvhb6p63q
The http controllers handler crashes when there are non-ascii chars in the url path.
`openerp.modules.module.ad_paths` containing unicode strings, werkzeug fail to compare the path `module` which is converted to ascii.
force `module` to be bytestrings
bzr revid: fme@openerp.com-20130502123657-f2sg50fq3216lh7d
The use_parent_address field is not directly related to the
address type field and was not really meant to be hidden
along with it.
In addition, the div[@name=div_type] and the corresponding
label[@for=type] were duplicated in the embedded form view
inside the `child_ids` field, but that happened later in
the 7.0 series. As a consequence the inherited view must
not rely on the presence of the latter, since some users
may install sales on top of an older version of the base
views. The XPath expressions were therefore modified to
match the first occurrence of these elements in the original
res.partner view, and to match *only* the second occurrence
in the new version of the view.
This works via a dirty hack relying on the fact that
the `use_parent_address` field is present in the first
occurrence of the div in the original view, but not
in the newer view, so the XPath expression can be made
to match only *one* element in each version of the view.
(Keep in mind that XPath evaluation will always return
results in the order of the document being looked up,
and the ORM only uses the first match. So matching
both nodes was not an option.)
bzr revid: odo@openerp.com-20130429105458-r89mnkx8okdxsdld
Needaction counters are now updated :
- when loading the menus (as before),
- when performing an action in a form view (update the current menu),
- when cliking on a top-level menu item (update all childs menus)
bzr revid: tde@openerp.com-20130426093653-gwdciylu26nfntzp
server branch: when reloading the needaction of some menus, also
reload those of related menus. Related menus are defined in the
context of the action associated with the menu, in a
needaction_menu_ref key that is a list of menu xml_ids.
bzr revid: tde@openerp.com-20130426093505-l8u8lovlswnj009q
Added a needaction_menu_ref key in the context of some actions to
automatically reload the counter of menus related to an action.
Various mailboxes are now dynamic.
Reading messages now increase/decrease the needaction counters with the
corect number.
Added a missing message_unread filter on My Tasks in project_gtd.
bzr revid: tde@openerp.com-20130426093443-dx3bwe0i6ubczb0e
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