Commit Graph

264 Commits

Author SHA1 Message Date
Denis Ledoux 9cede6794d [FIX]base: missing quote in domain of res_partner filter on name
bzr revid: dle@openerp.com-20131118155230-hvdm4yqu5fz3w5q4
2013-11-18 16:52:30 +01:00
Olivier Dony 06a3255576 [IMP] res_partner: default search field can be based on display_name + have email matching by default
This more closely matches the behavior of name_search,
until name_search is actually available in search views.

bzr revid: odo@openerp.com-20131028155600-1dwd35sjht2of63m
2013-10-28 16:56:00 +01:00
Thibault Delavallée 45780c147d [IMP] Partner View Improvement: remove history tab.
This server branch comes with an addons branch where the various
items of the history tab are removed and transformed into
contextual buttons.
Names are added to two pages of the partner notebook to be able
to reference them in future inheritance.

bzr revid: tde@openerp.com-20130614120540-5qvvh07cu2quwi71
2013-06-14 14:05:40 +02:00
Christophe Simonis a61e7cb0c8 [MERGE] forward port of branch saas-1 up to revid 4887 chs@openerp.com-20130612153934-qyp6pb3bc4za4taf
bzr revid: chs@openerp.com-20130613172414-dln3g4j0ykcwaa02
bzr revid: chs@openerp.com-20130613173900-xl7rh321nnw2b04b
2013-06-13 19:39:00 +02:00
Christophe Simonis 6f170ec732 [MERGE] forward port of branch 7.0 up to revid 5006 chs@openerp.com-20130612151912-m19okjsdkjo12qnt
bzr revid: chs@openerp.com-20130612152826-j9sj42ten9mic8s0
2013-06-12 17:28:26 +02:00
Olivier Dony 74e0201356 [MERGE] OPW 590300: make some action help texts consistent with the rest of the system
The policy is to have a one-line paragraph with
class `oe_view_nocontent_create` that directs the
user to the create button. There are exceptions
when the action is not supposed to be used to
create new records, in which case the help
text should indicate so.

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

bzr revid: odo@openerp.com-20130607162045-7di6r2fllm6k988x
2013-06-07 18:20:45 +02:00
Thibault Delavallée b545e866b1 [MERGE] Sync with trunk
bzr revid: tde@openerp.com-20130604134405-byfc98qwgyeoufrl
2013-06-04 15:44:05 +02:00
Vo Minh Thu 048b365aff [FIX] renamed Partner Catgories to Partner Tags.
bzr revid: vmt@openerp.com-20130604124003-bpga8k6lq4s7qlvp
2013-06-04 14:40:03 +02:00
Thibault Delavallée 4de42dc5a8 [MERGE] Sync with trunk
bzr revid: chm@openerp.com-20130415133654-l5b7zvga6mrv8bs3
bzr revid: tde@openerp.com-20130515082426-93tdl16rtm2kfz3a
bzr revid: tde@openerp.com-20130523133300-1el48hf8sotnvz62
2013-05-23 15:33:00 +02:00
Nimesh Contractor (OpenERP) b2c84a8310 [IMP] when create company form supplier it should be supplier by default, same for the customer and when both the company should be both customer and supplier.
bzr revid: nco@tinyerp.com-20130523052403-lk8e1ghfglwtavg5
2013-05-23 10:54:03 +05:30
Nimesh Contractor (OpenERP) be683318ef [MERGE] lp:~openerp-dev/openobject-server/trunk-bug-1128656-nco, supplier contact should be the suppier by default.
bzr revid: nco@tinyerp.com-20130523050632-bujvgr6j1lhj2or3
2013-05-23 10:36:32 +05:30
Nimesh Contractor (OpenERP) d0236bd31e [FIX] set defalut customer and add field customer to store value of customer.
bzr revid: nco@tinyerp.com-20130515075140-dql9dhnygtgi7319
2013-05-15 13:21:40 +05:30
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 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
Christophe Simonis 261dea6fec [MERGE] forward port of server v7 up to revision 4954
bzr revid: qdp-launchpad@openerp.com-20130422093655-txqmbalod6qmw1s6
bzr revid: chs@openerp.com-20130423183723-9kiexdyzdew8iuzm
2013-04-23 20:37:23 +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 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 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
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 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
Christophe Matthieu a1f1782cc0 [IMP] res_partner, res_users: small change in views
bzr revid: chm@openerp.com-20130410130145-qhtvhx6lrl3gt3x5
2013-04-10 15:01:45 +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
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
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
Thibault Delavallée 2ab15ddeaf [MERGE] Sync with trunk.
bzr revid: tde@openerp.com-20130405110750-1dd4y02xz3wb6ill
bzr revid: tde@openerp.com-20130405133237-n7k66b3w0b3a17o3
2013-04-05 15:32:37 +02:00
Vo Minh Thu 307ca374d6 [MERGE] forward merge 7.0 until revision 4919.
bzr revid: vmt@openerp.com-20130404130704-24vsmczw34cssytd
2013-04-04 15:07:04 +02:00
Thibault Delavallée bef293af4b [IMP] res_partner: customers is now sequence 2, because salesteam will be 1.
bzr revid: tde@openerp.com-20130404115719-glq8uqgvyvhm0ukd
2013-04-04 13:57:19 +02:00
Christophe Matthieu a423e08fee [IMP] res_partner: remove has_user_ids
bzr revid: chm@openerp.com-20130402082052-99wun0xuf6g4heh4
2013-04-02 10:20:52 +02:00
Christophe Matthieu 0cf0cf4f4c [IMP] res_users,res_partner: login = email
bzr revid: chm@openerp.com-20130326130127-974jagzvhon0biiy
2013-03-26 14:01:27 +01:00
Ravish (Open ERP) 5d4b0d3a62 [IMP]applied arrow to the specified form
bzr revid: rmu@tinyerp.com-20130322101430-hwkp4m97vst5ii8n
2013-03-22 15:44:30 +05:30
Christophe Matthieu b860c00593 [IMP] res_partner: remove help for quick create of user_id
bzr revid: chm@openerp.com-20130304130632-ym2iax2b3p89ifn3
2013-03-04 14:06:32 +01:00
Christophe Matthieu a90ef98704 [MERGE] from trunk
bzr revid: chm@openerp.com-20130226105813-1mi6tg4h7460vyj2
2013-02-26 11:58:13 +01:00
Antony Lesuisse 237d3d8500 [FIX] res.partner search, customer or supplier, related companies only for companies
bzr revid: al@openerp.com-20130223003935-eoinzil3ag3wmffq
2013-02-23 01:39:35 +01:00
Christophe Matthieu 25959e7dd1 [IMP] res_user: add a simplified form view with a comment for default_groups_ref values
bzr revid: chm@openerp.com-20130130111305-7g70l4cz7gfk98dr
2013-01-30 12:13:05 +01:00
Christophe Matthieu 098ce6d258 [IMP] res_partner: context with simple_mode for the user_id field
bzr revid: chm@openerp.com-20130128140120-3oxed3t9fj5r2agv
2013-01-28 15:01:20 +01:00
Antony Lesuisse 4e6607c75c [IMP] res.partner missing group by country
bzr revid: al@openerp.com-20130125214027-usu1y7eho9gm9uld
2013-01-25 22:40:27 +01:00
Christophe Matthieu 0c59cb52c9 [FIX] res_partner: kanban view : update contact avatar on edit mode (for company partner)
bzr revid: chm@openerp.com-20130111145459-e2rp9o3bmh2p679i
2013-01-11 15:54:59 +01:00
Quentin (OpenERP) eec2a5c96c [FIX] base, res.partner.form view: removed group no one on title field as this field is sometimes filled (migration, contact creation from lead...) and sometimes used as well (in reports). Besides there is no good reason to hide it
bzr revid: qdp-launchpad@openerp.com-20121227142116-zl8n0v550pbf12ju
2012-12-27 15:21:16 +01:00
niv-openerp 692cea3039 Removed default image on partners, use default one in the kanban view if false
bzr revid: nicolas.vanhoren@openerp.com-20121221120631-2uugaiexqanwbi00
2012-12-21 13:06:31 +01:00
Olivier Dony e29f0565c9 [IMP] res.partner: form view: show phone numbers in embedded contacts kanban; search view: less confusing label `Partner` -> `Name` for default search criterion
bzr revid: odo@openerp.com-20121220131606-fiuo04pn1s66bmk1
2012-12-20 14:16:06 +01:00
Ajay Chauhan (OpenERP) 2469d3b4ab [MERGE] merge with lp:openobject-server
bzr revid: cha@tinyerp.com-20121203062636-xnhqfm6491lib2hl
2012-12-03 11:56:36 +05:30
Fabien Pinckaers f5e755c409 [IMP] saving space for partners kanban
bzr revid: fp@openerp.com-20121130082137-97qibfk3k0v6y51l
2012-11-30 09:21:37 +01:00
Ajay Chauhan (OpenERP) 15226021d2 [IMP] made supplier visible on customer form
bzr revid: cha@tinyerp.com-20121130060054-tm6x6rc3ko8j28oj
2012-11-30 11:30:54 +05:30
Fabien Pinckaers 432715b184 [IMP] category -> tag
bzr revid: fp@openerp.com-20121127221111-vbguuof91pjri4nr
2012-11-27 23:11:11 +01:00
Fabien Pinckaers 6740c05cc4 [IMP] typo
bzr revid: fp@tinyerp.com-20121126215347-cd9vxrpmfjsv1kx9
2012-11-26 22:53:47 +01:00
Quentin (OpenERP) c78d16d49e [FIX] base, res.partner.view: remove duplicated invisible attribute that was totally hiding the 'type' field
bzr revid: qdp-launchpad@openerp.com-20121126145408-dq7utnmitpeaymn1
2012-11-26 15:54:08 +01:00
Hiral Patel (OpenERP) bc63b42c04 [IMP] Change string of Search Category to Search Tag
bzr revid: hip@tinyerp.com-20121123064910-406cfczq3ftb93z2
2012-11-23 12:19:10 +05:30
Arnaud Pineux 16203707c3 [IMP] change order for top menu item sequence number
bzr revid: api@openerp.com-20121122082630-ujk49g77z1mb8gqg
2012-11-22 09:26:30 +01:00
Khushboo Bhatt (Open ERP) 7aad4d8e0d [MERGE]merge with trunk
bzr revid: kbh@tinyerp.com-20121109052642-2nte0ax6pu7oktuy
2012-11-09 10:56:42 +05:30