Commit Graph

69361 Commits

Author SHA1 Message Date
Launchpad Translations on behalf of openerp 494c0f8bca Launchpad automatic translations update.
bzr revid: launchpad_translations_on_behalf_of_openerp-20130411144357-92txcwycw3kgyd5k
2013-04-11 14:43:57 +00:00
Olivier Dony b9eafcde22 [ADD] account_report_company module: new module for adding "commercial entity" m2o on invoices and "Partner Company" dimension on Invoice Analysis
bzr revid: odo@openerp.com-20130411125525-1typd4fuuvrbobae
2013-04-11 14:55:25 +02:00
Thibault Delavallée ee844c0ac6 [FIX] crm: fixed on_change_user that was crashing because
refers to a default_section_id field that is added in sale_crm bridge module.
New behavior is : one of the team user_id is a member (crm), or
default_section_id if defined or default behavior (sale_crm)

bzr revid: tde@openerp.com-20130411123356-kc8ty16i71nwgzsm
2013-04-11 14:33:56 +02:00
Thibault Delavallée f8a2299525 [MERGE] [FIX] mail, email_template: fix attachment duplication and clean attachment management
The way attachments are linked to the document has been cleaned. Posting method message_post may receives 2 arguments:
- attachment_ids: those linked to the wizard model (mail.compose.message) are linked to the document (res_model, res_id)
- attachments: the tuples are used to create new attachments linked to the document
The wizard does not set the res_model and res_id of attachments anymore, delegating this job to message_post.

The mail.message and mail.compose.message now use their respective attachment_ids field when possible. This is done instead of reading/creating new attachments based on the attachments tuple each time a mail.compose.message is processed. Email templates now also use attachment_ids, in particular when generating emails, instead of using the attachments tuple. Only reports are still generated on the fly and put into attachments instead of attachment_ids.

A cron job has been added to unlink 'lost' attachments. Those are attachments:
- linked to 'mail.compose.message'
- with res_id=0 (due Chatter used in minimal mode or reports generated by templates before the wizard has an ID)
- with no activity for more than one day (create_date and write_date)

bzr revid: tde@openerp.com-20130411112033-mqph9vjlcjkoolfs
2013-04-11 13:20:33 +02:00
Thibault Delavallée 9e4486ae52 [FIX] mail: fixed missing conflict resolution
bzr revid: tde@openerp.com-20130411104659-ik62af6wubzu5j6q
2013-04-11 12:46:59 +02:00
Thibault Delavallée 8c7cf300eb [MERGE] [FIX] mail: bettersuggested recipients based on email address. It tries to find a partner that is in the related document followers, or a user, or the first partner with matching email.
bzr revid: tde@openerp.com-20130411104151-wi5ru54b362pv957
2013-04-11 12:41:51 +02:00
Thibault Delavallée fe2ea997a2 [MERGE] Sync with trunk.
bzr revid: tde@openerp.com-20130411103645-rmr3sa8p9ropx2gc
2013-04-11 12:36:45 +02:00
Thibault Delavallée f994529725 [IMP] mail: finding partner based on email: improved code for suggested partners, added somme comments and tests.
bzr revid: tde@openerp.com-20130411101720-mumz152dsxvv1xbj
2013-04-11 12:17:20 +02:00
Olivier Dony 5937980b1d [FIX] res.partner form view: inherited view now hides `use_parent_address` on top of `type` + fix embedded form view too
The `use_parent_address` flag is meant for advanced use
in companies that want to make sure their contact/company
addresses are always in sync, at the possible cost of some
usability loss when editing existing addresses (need to
open the company form view, contact fields are read-only).

The embedded mini-form view of the contacts also need to
be inherited to make it match the main view.

bzr revid: odo@openerp.com-20130410170437-2v4ehptknk6yf1x2
2013-04-10 19:04:37 +02:00
Olivier Dony 59fe76f24c [FIX] res.partner form: switch default `use_parent_address` to False in kanban contact too, replace by defaults for address fields
We should never turn the `use_parent_address` option on
unless the user explicitly wants to use it. It makes
further editing more convoluted (need to go to the
company address) and is really an advanced feature.

It was only set by via context defaults when adding
contacts to a company ; we can replace that with a
set of defaults that will copy the company address
fields to the contact. Users can still switch to
automatic synchronization if they really want it,
or simply further edit the address of the contact.

Also fixed the layout of the mini-form view, now
using a simpler vertical layout with address at
bottom, since the main info of a contact needs
to be entered first.

bzr revid: odo@openerp.com-20130410170101-t9covdj6nmyn44jf
2013-04-10 19:01:01 +02:00
Olivier Dony 5a222c8f90 [FIX] res.partner form view: remove now useless oe_inline class so `company` field can take 100% width of parent div
bzr revid: odo@openerp.com-20130410154242-kkgrthb5cb11d49d
2013-04-10 17:42:42 +02:00
Olivier Dony 8468af8606 [FIX] res.partner.name_search: make sure companies always come before contacts when both match
bzr revid: odo@openerp.com-20130410152309-u4dn8bxssvcwdc8c
2013-04-10 17:23:09 +02:00
Olivier Dony 140554c9f8 [REVERT] account.invoice: remove "commercial entity" domain on partner_id, to keep it consistent everywhere
Being able to choose a contact to invoice is very important
because the invoice must go to the right person.
When the invoice creation is automated by e.g. a Sales Order
any partner can be used (even though the system will
preselect the `invoicing` partner of the company if
one exists).
We have to keep that freedom when manually creating invoices.

bzr revid: odo@openerp.com-20130410135308-pd54c7ml8t3pcefl
2013-04-10 15:53:08 +02:00
Quentin (OpenERP) 748681e5d2 [FIX] project_long_term: don't create the project twice if 'use_phases' is thicked.
bzr revid: qdp-launchpad@openerp.com-20130410125046-01n3v3p5pnu78wgs
2013-04-10 14:50:46 +02:00
Olivier Dony 9bec1595bd [FIX] res.partner address sync: `type` field should not be synced wih other address fields
It is valid to use the parent address but still set a different
type of address - the name, email, phone, etc. could be different.

bzr revid: odo@openerp.com-20130410123229-9l60sbcks3tpmy7x
2013-04-10 14:32:29 +02:00
Quentin (OpenERP) 241b9ee07a [IMP] analytic: add the 'visibility tracking' on some fields in the chatter, to log when an important thing is changed
bzr revid: qdp-launchpad@openerp.com-20130410122011-xgih371ewlxc7aq5
2013-04-10 14:20:11 +02:00
Quentin (OpenERP) 904b810665 [MERGE] hr & co, demo data: update of the pictures of employees
bzr revid: qdp-launchpad@openerp.com-20130410121608-o6bwoukk4w7p8fsm
2013-04-10 14:16:08 +02:00
Olivier Dony 9dbe29b2b5 [FIX] res.partner.address_get: default to partner being looked up rather than company when no match is found at all (and no "default" exists)
Using the commercial entity is not a very good default choice
in many cases. If a new contact is created on-the-fly for a
new document (e.g. sales order), his/her company may be an
empty shell and/or a large corporation that should not be
directly used for e.g. billing/invoicing purposed.
Once a contact/company is set to "invoicing" or "delivery"
we use it, but in other cases we stick to the provided
partner/contact as a saner default.
This should not change anything for cases where advanced
contact management is used and proper address types are
set.

bzr revid: odo@openerp.com-20130410121536-vm93o6vxhi3b8feu
2013-04-10 14:15:36 +02:00
Cedric Snauwaert e2e3451697 [FIX]l10n_be: remove bad account from fiscal position Régime National
bzr revid: csn@openerp.com-20130410085430-ovtiyhj8ilhfe9rk
2013-04-10 10:54:30 +02:00
Josse Colpaert 3887d1e6fa [FIX] Adapt like issues and tasks
bzr revid: jco@openerp.com-20130410084638-v9yeobgc91yy7lyx
2013-04-10 10:46:38 +02:00
Launchpad Translations on behalf of openerp 75997ddc1c Launchpad automatic translations update.
bzr revid: launchpad_translations_on_behalf_of_openerp-20130410055452-4saqwvwv6cgtil6s
2013-04-10 05:54:52 +00:00
Frédéric van der Essen b2a872846c [FIX] point_of_sale: use the correct rounding method for computing taxes
bzr revid: fva@openerp.com-20130409160021-707f3vrxcrqytsl6
2013-04-09 18:00:21 +02:00
Frédéric van der Essen 174ef7b490 [MERGE] adding a rounding method that is compliant with the server side rounding method
bzr revid: fva@openerp.com-20130409154129-gul9hkn0p4nt24md
2013-04-09 17:41:29 +02:00
Frédéric van der Essen a5e4d757a1 [FIX] add a correct rounding algorithm to be able to duplicate server-side financial computations
lp bug: https://launchpad.net/bugs/1157761 fixed

bzr revid: fva@openerp.com-20130409144414-nqnmkny5cxrmyru1
2013-04-09 16:44:14 +02:00
Frédéric van der Essen c176e1e7ca [IMP] point_of_sale: renamed round_digits to round_decimals
bzr revid: fva@openerp.com-20130409144208-2wq4cozxstbdgld5
2013-04-09 16:42:08 +02:00
Frédéric van der Essen 35d3a3480a [FIX] point_of_sale: use correct rounding algorithm
lp bug: https://launchpad.net/bugs/1157761 fixed

bzr revid: fva@openerp.com-20130409143536-hgs38n0sqx8td607
2013-04-09 16:35:36 +02:00
Cedric Snauwaert e2e851dd07 [FIX]account_payment_report: formatlang expect float value not string
bzr revid: csn@openerp.com-20130409135107-y59zf6x2p85yvgva
2013-04-09 15:51:07 +02:00
Fabien Meghazi 74997ff408 [IMP] res.partner form view, autofocus Contact notebook/page on visibility change
bzr revid: fme@openerp.com-20130409122954-mkene266qvcfe6nr
2013-04-09 14:29:54 +02:00
Fabien Meghazi 905d13671b [FIX] Do not autofocus Notebook pages by default
bzr revid: fme@openerp.com-20130409122852-f4ikugl83otx8423
2013-04-09 14:28:52 +02:00
Quentin (OpenERP) 8c8bfd706b [FIX] purchase, sale_stock: fix computation of date_planned when no timezone is defined for the user
bzr revid: qdp-launchpad@openerp.com-20130409122530-svv1kpk57s2nrsa9
2013-04-09 14:25:30 +02:00
Cedric Snauwaert a7bf53ebaa [FIX]error introduce in revid:odo@openerp.com-20130405151451-anjsdt18gmsxr01k
function date_to_datetime should return a date in server datetime format

bzr revid: csn@openerp.com-20130409091433-4u3nxejdrti7czu3
2013-04-09 11:14:33 +02:00
Launchpad Translations on behalf of openerp 6fe10fc8e5 Launchpad automatic translations update.
bzr revid: launchpad_translations_on_behalf_of_openerp-20130409055857-v475gufg9pm5zbqy
bzr revid: launchpad_translations_on_behalf_of_openerp-20130409055920-gtfw1ljrgaej1u0u
bzr revid: launchpad_translations_on_behalf_of_openerp-20130406063645-b7q6s71zvtm9orxm
bzr revid: launchpad_translations_on_behalf_of_openerp-20130407060119-7ojh5lykuwm3ydbn
bzr revid: launchpad_translations_on_behalf_of_openerp-20130409055924-46ylmw1wqri80wgs
2013-04-09 05:59:24 +00:00
Quentin (OpenERP) 70fbc25d93 [IMP] base, res_partner and contacts management: improve usability and user experience.
1) whennever a contact is created from a parent record: allow to set a dedicated address
2) move the use_parent_address field near the address

bzr revid: qdp-launchpad@openerp.com-20130408155934-bk2apzq1gcktqr6m
2013-04-08 17:59:34 +02:00
Josse Colpaert 51ba970efa [FIX] Clarify no employee message for leave requests + typo please help them
bzr revid: jco@openerp.com-20130408150635-iguk7xhn4xx84vo0
2013-04-08 17:06:35 +02:00
Quentin (OpenERP) 9f25ba0d78 [MERGE] point_of_sale: prohibit the use of bank journal that aren't of type 'bank' or 'cash' as payment method in the pos
bzr revid: qdp-launchpad@openerp.com-20130408142449-w0wemrmds3ikc46v
2013-04-08 16:24:49 +02:00
Quentin (OpenERP) 631759a2a9 [FIX] report, trml2pdf: allow to use <pageNumber/> tag under a flowable area (<place>...<place/>).
bzr revid: qdp-launchpad@openerp.com-20130408132510-7pq0ityec9sl702f
2013-04-08 15:25:10 +02:00
Thibault Delavallée 8b97805621 [FIX] mail: fixed some translation issues.
Document created text was not translatable
Subtype was fetched without context, therefore not translated
Removed odd override of _t introduced in mail_followers at revision 7885

bzr revid: tde@openerp.com-20130408092447-3ri41v6xluuj0wha
2013-04-08 11:24:47 +02:00
Launchpad Translations on behalf of openerp eb3ffc52ed Launchpad automatic translations update.
bzr revid: launchpad_translations_on_behalf_of_openerp-20130406063640-151b9f95w2tgiifb
bzr revid: launchpad_translations_on_behalf_of_openerp-20130407060111-hobhqctome9qtz6c
bzr revid: launchpad_translations_on_behalf_of_openerp-20130408062055-hzgkrbw8lvkfphxe
2013-04-08 06:20:55 +00:00
Launchpad Translations on behalf of openerp 161841af7e Launchpad automatic translations update.
bzr revid: launchpad_translations_on_behalf_of_openerp-20130406063615-7i83z5nw8t61j74f
bzr revid: launchpad_translations_on_behalf_of_openerp-20130407060018-f3clm2r44u1qf71g
bzr revid: launchpad_translations_on_behalf_of_openerp-20130408062007-qrme94qjqgan9ie9
2013-04-08 06:20:07 +00:00
Olivier Dony 41d3c2ae88 [FIX] sale: use invoicing partner rather than main one for analytic account context, spotted by Raphael Valyi on bug 1160365
lp bug: https://launchpad.net/bugs/1160365 fixed

bzr revid: odo@openerp.com-20130408030052-xgk5p8zkagu21scs
2013-04-08 05:00:52 +02:00
Olivier Dony 2bf1034cd2 [FIX] res.partner: autosync of commercial fields and address fields + correct views accordingly + basic tests
* Commercial fields (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_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. [This is Part A of the solution on bug 1160365].

Then, whenever a partner is created or modified:
- if it is a commercial entity, the commercial fields are synced
downstream to all its descendants, stopping at company boundaries.
- if is is not a commercial entity, the commercial fields are
synced from its parent commercial entity.
The list of fields to sync is determined by calling the new
res.partner method `_commercial_fields()` which can be easily
extended by any module that adds commercial fields on res.partner.
A utility method `open_commercial_entity()` was added to
res.partner to make it easy to include a button for editing the
parent commercial entity, to be displayed instead of now-hidden
commercial fields.
[This is part B of the solution on bug 1160365]

The res.partner.address_get() method (used to find child partners
of certain types, e.g. "invoice") was udpated to take the new
"commercial entity" notion into account: it will now look for
matches in children but also parents and siblings that are part
of the same "commercial entity". The default partner `type` is
now "contact" to reflect the new model ; "default" is
inappropriate because it is a wildcard and would stop the type
lookup early.
[This composes parts C and D of the solution on bug 1160365]

Note: This fix comes with a matching addons fix to implement
module-specific extensions of part B, as well as part E of the
solution.


* Address fields (bug 1160425)

Corrected autosync of address fields is also included in the
same branch, because those two mechanisms are closely related
and share some parts of the implementation.

The `use_parent_address` field now defaults to False (except
in the mini-kanban view of contacts on a partner form), and
the autosync of address fields has been modified to only work
downstream and never update a parent company if a child contact
is modified. Instead, the address fields are now displayed
readonly on contacts that use the parent address, with a button
to edit the parent address (new method open_parent(), similar
to open_commercial_entity() but opening the direct parent).

To make the initial creation of a contact + company pair,
a special case was added: when a new contact is created for
a company that has no other contact and no address, the
address of the contact is assumed to be that of the company
so it is moved to the company, then the `use_parent_address`
flag is enabled on the contact, and the `is_company` flag on
the company. This covers a use case where contact and
company are created on-the-fly when creating a new document.

Many logical flaws in the autosync of address fields have been
corrected and are now covered by unit tests.


* Misc related fixes

- checking `is_company` does not reset the parent_id field
anymore, to allow for multi-level structures. The field is
still hidden automatically because having an empty "Company"
field on the form view of a company is quite suprising), but
this UI behavior is easily customized;
- the `email`, `phone`, `fax`, `mobile`, `lang`, etc. that
were sometimes synced when changing parent company are now
properly left alone;
- the `use_parent_address` field is now always visible next
to the parent_id field when a parent is set

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

bzr revid: odo@openerp.com-20130408013742-tm8w0w0nmunanokk
2013-04-08 03:37:42 +02:00
Olivier Dony ed62e36691 [FIX] account_voucher,sale,purchase: include contacts matches when searching for company documents
This implements part E of the solution described on bug 1160365

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

bzr revid: odo@openerp.com-20130408005526-7124r7u39yhh9la3
2013-04-08 02:55:26 +02:00
Olivier Dony e4f04efdd6 [FIX] account.invoice: only allow selecting partners that are `commercial entities`
Following-up to the discussion on bug 1160365, this will help users
make the right choice when manualling creating invoices.

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

bzr revid: odo@openerp.com-20130408000124-wcmjco9561hc9fbl
2013-04-08 02:01:24 +02:00
Olivier Dony 347c784dab [FIX] account: include contacts matches when searching for company invoices
This implements part E of the solution described on bug 1160365

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

bzr revid: odo@openerp.com-20130407235640-cg02qh4ittc743zw
2013-04-08 01:56:40 +02:00
Olivier Dony dcac505a5b [FIX] sale: remove useless code to select commercial entity, now handled by res.partner.address_get directly
lp bug: https://launchpad.net/bugs/1160365 fixed

bzr revid: odo@openerp.com-20130407235115-4kovy1jngblrdd5z
2013-04-08 01:51:15 +02:00
Olivier Dony 438e1c1daf [FIX] res.partner: Hide commercial-related fields on contacts form + autosync them from parent company
Fixes handling of accounting/invoicing-related fields on partners
that are not "commercial entities" (either marked as "is_company"
or parentless).
The corresponding fields are also hidden from form views on these
partners and replaced by a short sentence and a link to edit the
"master fields" on the commercial entity.
This corresponds to part B of the solution described on bug 1160365.

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

bzr revid: odo@openerp.com-20130407235013-j3tv4uxy46eej43i
2013-04-08 01:50:13 +02:00
Olivier Dony ad1650854e [FIX] account: recursively find proper partner to link to journal items, as discussed in bugs 1160365 and 1151947
lp bug: https://launchpad.net/bugs/1160365 fixed
lp bug: https://launchpad.net/bugs/1151947 fixed

bzr revid: odo@openerp.com-20130407212333-34jahthhppcz2wju
2013-04-07 23:23:33 +02:00
dle@openerp.com a27dd438a7 [REVERT]base_import: revert of last change, because break tests and needs review
bzr revid: dle@openerp.com-20130405182351-0qfqd5klz9g25n9m
2013-04-05 20:23:51 +02:00
dle@openerp.com 5819cefd4b [FIX]base_import: get_fields now displays database id of the current model imported in normal fields
bzr revid: dle@openerp.com-20130405175827-58ahjgprju2gf4p9
2013-04-05 19:58:27 +02:00
Quentin (OpenERP) 8dea4ca3aa [MERGE] crm: adding onchange on user_id field in opportunity form view in order to fill automatically the sales team
bzr revid: qdp-launchpad@openerp.com-20130405154143-bccw695tadw0o5pi
2013-04-05 17:41:43 +02:00