Commit Graph
103231 Commits
Author SHA1 Message Date
Yannick Tivisse aed779b0ad [IMP] product: Pricelist creation on Company creation if new currency
When working in multi-company, and each company using its own currency,
a pricelist for the second company should be created. For instance, our
default company is in Belgium -> € and there is a default pricelist in €.
Then you create a second company in US -> $. It is impossible for the us
company to sell in its own country because there is no $ pricelist.

When creating the second company, if the currency is different than the
first company one, the default pricelist in the currency should be created.

In all the cases, a ir.property should be created to link the
'property_product_pricelist' on the 'res.partner' to the new company.

Furthemore, a small usability improvement. The currency should be
activated before creating the company. So we change the label to indicate
that behavior and make the action in target new to prevent the creation flow
to be broken
2016-03-09 14:13:08 +01:00
Yannick Tivisse b1b8d0b353 [FIX] account: buggy typo in unused line
it was a tracback prone res
2016-03-09 14:09:37 +01:00
Mansi Trivedi 2432483e14 [IMP] account: Make fiscal position field searchable on partner form
- Remove the "selection" widget from the fiscal position field.
- User can create this field only from Configuration menu of accounting.
2016-03-09 14:00:11 +01:00
Goffin Simon 13c33264e6 [FIX] purchase: _get_po_line_values_from_proc-sig
Introduced by eefc76f
Only the supplier taxes of the company set in the procurement
must be set in the PO.

Backport from f5989bc3d8

opw:671449
2016-03-09 13:16:14 +01:00
Géry Debongnie f970906c9e [IMP] base,openerp,web: add debug mode === 'assets' and don't split assets by default
This is a rather large change for developers: from this commit on, we
need to use debug=assets instead of just debug to split assets.

The About menu has been slightly improved as well (the link does not
appear when we are already in debug mode), and an option has been added
in the debugging menu to activate the assets debugging mode.
2016-03-09 13:01:34 +01:00
Géry Debongnie 3cc96b2a8e [IMP] base_geolocalize: replace old gtk icon by shiny new fa icon 2016-03-09 13:01:34 +01:00
Géry Debongnie c5c3ab927e [IMP] mail: load audio file lazily 2016-03-09 13:01:34 +01:00
Géry Debongnie e877d59d21 [REM] mail: remove old announcement bar 2016-03-09 13:01:34 +01:00
Aaron Bohy 46857d267b [IMP] board,web: view_manager: lazy loading of default multi-record view
After a refresh or when opening odoo in a new tab, if view_type="form" is
specified in the url, RPCs to load the default multi-record view will be
performed if/when the user clicks on the breadcrumbs.

Moreover, the view manager is directly initialized with the res_id to load
after a refresh on a form view, to prevent the form view to fetch the defaults
values, to render in 'create' more, and then load the requested record and
switch back to 'view' mode.

Some code refactoring as well:
  - don't propagate state to the view_manager, but directly the view_type and
    res_id
  - remove unused argument no_store from switch_mode()
  - view_registry.get(): remove unused second argument
  - no need to switch_mode in do_load_state() as the correct mode is now loaded
    directly, even if it is a mono-record view

Also adapt code in dashboard.js according to changes in view_manager.
2016-03-09 13:01:34 +01:00
Aaron Bohy 8a47095a60 [REF] web: view_manager's init
Always initialize a view_manager with its dataset and views, but without the
action (at least explicitely, as the action might still be given within the
options).

This is a backport of changes in enterprise to keep the view_manager's API
similar in both repository, which is required the large refactoring that will
arrive.
2016-03-09 13:01:34 +01:00
Christophe Simonis d1067cf83f [FIX] stock_account: avoid duplicate ids in stock.history
Since 27a7cab52b, it may happen that the
stock.history view contains duplicated id (mutliple quants with
different lots for a single move).

Regroup serial numbers in order to keep a unique id per row.

opw-669349
2016-03-09 12:51:33 +01:00
Yannick Tivisse a82413fb7a [IMP] website_event: Label 'Participating' on frontend
On the event page and on the event list page on a website, add a
label "participating" for the logged users that are participating
to the event to avoid mistakenly double-subscribing. But we don't
hard-prevent it, because it should still be possible to subscribe someone else.

Small improvement: The portal group in general settings was hidden. We set it
visible because it contains some useful options like 'Allow external users to
sign up'
2016-03-09 12:13:23 +01:00
Goffin Simon f5989bc3d8 [FIX] purchase: _get_po_line_values_from_procs
Introduced by eefc76fdee
Only the supplier taxes of the company set in the procurement
must be set in the PO.

opw:666875
2016-03-09 12:10:39 +01:00
Denis Ledoux c175699e3f [FIX] sale: make New in new sales orders translate-able
opw-671476
2016-03-09 11:33:41 +01:00
Denis Ledoux f4006d22ef [FIX] crm: allow Settings users to set generate_sales_team_alias
The change of value of this param can lead to the
unlink of an `ir.values`, which can be performed
only by sudo.

opw-671469
2016-03-09 11:24:09 +01:00
Ravi Patel 85bcd6fdd8 [REF] account,payment_paypal: Remove the 'paypal_account' field
This field was relevant before the salepocalypse, it is no longer.
Replaced by generic payment providers instead of putting paypal payment methods
in account.

Remove it from the res.company and res.config model
Remove the method `_migrate_paypal_account` as it was used to find paypal
accounts based on the removed field

Closes #11231, task-22286
2016-03-09 11:15:32 +01:00
Damien Bouvy d69d08cfb1 [DOC] views: calender 'event_open_popup' is disabled by default 2016-03-09 10:35:58 +01:00
Goffin Simon 6cb518d530 [FIX] website_portal: state_options
Inspired from 1ef52c9

opw:668271
2016-03-09 09:26:21 +01:00
Damien Bouvy 7d90640fd0 [DOC] backend tutorial: end_date field should be on session class 2016-03-09 09:23:53 +01:00
Damien Bouvy 15b8f3586c [FIX] website_portal_sale: let ACL do their job
Specifying the partner_id in the search does not give the same
result as the portal_sale module, which actually lists all the
SOs/Quotes/Invoices where you or anyone from your company is the
partner_id. To make the backend and frontend listings consistent,
let the ACL and ir_rules do their job (these are defined in the
portal_sale module).
2016-03-09 09:23:43 +01:00
Goffin Simon f6a62fa6e1 [FIX] mrp: a member of group_mrp_manager can create Work center
When creating work center, a resource.resource record is created.
Then a member of group_mrp_manager is allowed to create resource.resource record.

opw:671218
2016-03-09 09:15:34 +01:00
Joren Van Onder 591d74becf [FIX] point_of_sale: do not select payment input when hidden
Edge >=12 throws an error (code 800a025e) when calling the select()
method on an input element that is not currently part of document and
has a non-empty value.

When adding a paymentline a "change:selected_paymentline" event gets
triggered which in turn triggers the focus_selected_line function before
the actual paymentline gets rendered.

opw-671426
2016-03-09 09:13:44 +01:00
Denis Ledoux 9fa597c9c2 [FIX] point_of_sale: sessions closing performances
`account.move.line.company_id` is a related
to `account_id.company_id`

`account.bank.statement.company_id` is a related
to `journal_id.company_id`

Any attempt to set the `company_id` value
when creating or writing records for these models
will result to the update of the value in
the related record (the update of `company_id` in the
`account.account and the `account.journal`), which
will result in the update of the `company_id` value in all
records in which this related record is used
(in all `account.move.line` where this `account_id` is used,
in all `account.bank.statement` where this `journal_id` is used).

In other words, the more a database had `account.move.line`
or `account.bank.statement` records, the more
it took time for the pos sessions to be closed.

To force a company for an `account.move.line`
(`account.bank.statement`), you must just
set the correct `account_id`(`journal_id`)
in the first place.

For instance, for the `account_id`, passing
`force_company` in the context ensure to choose
the `account.account` from the right company
property.

See
`local_context = dict(context or {}, force_company=company_id)`
which is set in `_confirm_orders` just before calling
`_create_account_move_line` which retrieve
the account from the
`property_account_receivable_id` property.

opw-671362
2016-03-08 17:55:52 +01:00
Nicolas Lempereur 6d56d02d05 [FIX] website_views: don't show view editor when versionning
The versionning has not been created for editing view with the website
HTML Editor, it can leads to several issues, among which are:

- getting the wrong view (good key but bad version) in the HTML Editor,
- losing view inheriting the modified view

So this commit remove the HTML Editor when a version is currently shown,
if a view needs to be edited with the HTML Editor it should be done only
on the 'master' version.

opw-667225
2016-03-08 17:13:58 +01:00
Nicolas Lempereur b0b6b9afb5 [FIX] website{,_version}: get current version view
customize_template_get which gets template inheritence informations was
not taken into account by website version, so at one time we could get
an erroneous view version instead of the wanted one.

This commit refactor some of the code adding a function to sort view and
find the most suitable one (based on website and version in request).

This function is then used in ir.ui.view `_view_obj`'s function to
select the correct view.

related to opw-667225
2016-03-08 17:13:58 +01:00
David Beal 4fed1026e0 [IMP] models: extract metamodel method _get_addon_name
Easier to reuse that way.

Closes #11223
2016-03-08 16:53:43 +01:00
Olivier Dony ed7567d3f5 [REM] sql_db: legacy useless tests and duplicate exception block
- The test for %f/%d is useless, eveybody has been using %s for
  ages, and the psycopg2 error is pretty explicit if you don't.
  It can introduce a small but useless delay for long queries.
- The duplicate except block was redundant with the generic `except
  Exception` block, with only a different log prefix.

+ the logging for the type testing of `params` was useless too,
raising a error is enough (though that particular test is still
relatively useful because the psycopg2 error isn't very clear
when you mess up the parameters)
2016-03-08 16:46:25 +01:00
Olivier Dony c4429aa499 [IMP] sql_db: use time.time() for timing query execution
Minor improvement: subtracting time.time() floats is about
10x faster than creating `timedelta` objects, and the code
is simpler.
2016-03-08 16:45:48 +01:00
Lionel Sausin 1a58e1085e [IMP] sql_db: log SQL queries before executing them
That way queries are visible at DEBUG level while they
are executing, rather than after the fact, making
the log less confusing to watch when long-running queries
are involved.

Closes #11182
2016-03-08 16:43:09 +01:00
Denis Ledoux 002722b967 [FIX] mail: Discuss > Send mail sends a private message
For a message to be considered as a private message,
the message must have:
 - `no_auto_thread` set to `False`
   in other words, it must not be attached to a thread
 - no `model` or `res_id` must be set on the message
   meaning the message is not attached to a specific
   record thread.

See `_get_message_id` in `mail/models/mail_message.py`.

Before this revision, the mails sent from
`Discuss` > `Send mail` were not regarded
as private messages,
but as a kind of mass mailing messages,
with a `reply-to` wrongly set.
Any attempt to reply to these mails
failed with a delivery failure notification.

This was because the `message-id` of these messages
contained `reply-to`, and such message-ids are
treated as a special case in the messages routing
(basically, the match on the mail references is disabled
for these messages containing `reply-to` in
their message-id).

opw-669241
2016-03-08 15:38:10 +01:00
Nicolas Martinelli 04f7858159 [FIX] mrp_operations: search function for date_planned_end
Commit bfa68b433 adds the field `date_planned_end` in the Gantt view.
However, the Gant view will perform search on this field, which is an
issue since it is a computed field without any `fct_search` defined.

opw-669042
2016-03-08 14:15:04 +01:00
Simon Lejeune 35e988e195 [REL] 9.saas~10 2016-03-08 13:52:04 +01:00
Mansi Gandhi 6a979b22c0 [IMP] account: Add one unique section of multi currencies. 2016-03-08 13:46:53 +01:00
Jairo Llopis 906bf16a76 [8.0][FIX] Make on_change in address_format divs work
To reproduce the bug:

- Create a partner.
- Set it state "Alaska".
- Country becomes "United States".
- Set a country for YourCompany, such as Spain.
- Create a partner.
- Set it state "Alaska".
- Country remains blank.

Also, `node.xpath("//field")` was running over every `<field>` in the
view, not just those inside the `<div class="address_format">`. Now it
only traverses the right nodes, which renders every affected view
faster.
2016-03-08 13:40:40 +01:00
Jignesh Rathod aa02465bbf [FIX] stock: Return a returned pick set the pack to 'Available'
1) Configure the warehouse "Your company" to pick-pack-ship operation
   (you'll need to activate the advance route on WH config + set up the
   correct process through the warehouse configuration wizard.
2) Create a SO with a product (on stock) and confirm it
3) Display the deliveries, you'll have 3 : pick, pack, ship
4) Take the pick, force availability if needed, and confirm it
5) Return the pick and validate (e.g. imagine you missed something like
   puting the lot, so you want to reverse the pick).
6) Go back to the SO, click to view the deliveries
7) You create another, new, pick here (which is correct). Take it and
   confirm it.
8) Look at the pack => his state is "Waiting another operation"... This
   is not good ! We should have it "Ready to transfer" (now "Available")
   because we just (re)confirm the pick operation.

Odoo don't know he should make the next operation (pack) available.
2016-03-08 11:48:35 +01:00
Nicolas Martinelli e8bc1c7e6b [FIX] mail: followers: allow edit subtypes even if not follower
Partial backport of 27e92415a. The JS modification is not applied, in
case any extension would use `records_length`.

opw-668781
2016-03-08 11:05:27 +01:00
Denis Ledoux 84b45515bd [FIX] hr: mention suggestions, exclude disabled employees partners
It was possible to mention an employee despite the
fact the associated partner and user were
both disabled.

opw-671130
2016-03-07 18:22:41 +01:00
Nicolas Martinelli b955bac100 [FIX] stock_landed_costs: stock input account
When assigning landed costs to products that have already left the
stock, the expense account is used instead of the stock input account.

opw-671311
2016-03-07 17:02:19 +01:00
Yannick Tivisse 7ab4f6e669 [FIX] base: Replace (correctly) group_light_multi_company
Because sometimes shit happens (see 8a2f4e7d3f)
2016-03-07 16:53:45 +01:00
Yannick Tivisse 240417be1e [FIX] hr_holidays: date_from and date_to missing on hr.holidays tree view 2016-03-07 16:43:37 +01:00
Yannick Tivisse f6c0418a80 [IMP] mail: Send plaintext emails on discussion with external user/partner
When there are no available action buttons on the email (as Follow, View Task,
Convert to Opportunity), i.e. when the user/partner is not an employee, and
when the message subtype is 'Discussion', send a plaintext mail instead of
a formatted one.

Use case: Strange to receive a mail like this when you're on a lead and you
receive formatted mails.
2016-03-07 15:55:53 +01:00
Yannick Tivisse 8a2f4e7d3f [IMP] base: Merge group_light_multi_company into group_multi_company
This distinction is useless and confusing.
2016-03-07 15:53:30 +01:00
Yannick Tivisse abdca55ea2 [FIX] User with 'Access Rights' rights not able to access Users menu
The ERP managers (users with 'Access Rights' rights) cannot even click on
the Settings app menuitem. Because of 2 things:
- The Dashboard settings is accessing the model ir_module_module. So
  we set a groups 'group_settings' on it.
- The Users view is accessing the model ir_module_category to groups
  the aggregate and display the settings. So we change the security rules
  by giving the access to the group_erp_manager instead of group_settings
- The global rules opn companies was applied to the erp managers. We
  splitted this ir.rules into three new ones on portal,public and employee
  users to allow the erp managers to access the companies
- Writing on the res_groups was calling the method _update_user_groups_view
  in all the cases. This method should be called only when the view was
  needed to be modified, i.e. when the category_id is modified for this
  group.
2016-03-07 15:53:30 +01:00
Yannick Tivisse 29404e096b [IMP] base,base_setup: easier multi-company configuration
- The 'Extra Access Rights' is now hidden out of debug mode
- The fields 'company_id' (current company) and 'company_ids'
  (allowed companies) are hidden if there are no more than 1
  company in the database.
- If there are more than 1 company, the fields are displayed
  on the user form view and setting more than 1 company on the
  user will add him into the group 'group_multi_company'. On the
  same way, setting only one company on a user will remove him
  from this group
- The group 'group_multi_currencies' is displayed on the General
  Settings. Enbaling this feature will add all the users into this
  group. This is more accurate as this feature is more global
  than per employee.
2016-03-07 15:53:30 +01:00
Yannick Tivisse 90981ec730 [IMP] Administration access right on Configuration->Settings menuitems 2016-03-07 15:53:29 +01:00
Yannick Tivisse fdb3ad7082 [REM] Remove the group 'base.group_configuration'
This additional administration group was formerly used to hide
the configuration menuitems for the common users.

Being manager should be enough to access these items
2016-03-07 15:53:29 +01:00
Goffin Simon 7cf20afb0b [FIX] account_check_writing: wrong duplicate period
When duplicating an account voucher, the period was duplicated even if
the Bill Date didn't match with it.

opw:669850
2016-03-07 15:32:29 +01:00
Mansi Gandhi d5f9338e81 [IMP] account: display user message to configure the tax-cash-basis-journal. 2016-03-07 14:51:13 +01:00
rap-odoo 59efea7e31 [IMP] account: Remove the 'reference' field from the Customer invoice report. 2016-03-07 14:47:36 +01:00
Ankit Joshi 266f798fc0 [ADD] stock: add the field 'description_picking' in picking report
The field is defined but never user. It could be useful to indicate
to the delivery guy that the product is 'fragile' or whatever.
2016-03-07 14:28:54 +01:00