Commit Graph

92076 Commits

Author SHA1 Message Date
Martin Trigaux 6dceae0de9 [FIX] purchase: access rights when validating a picking
When a warehouse user transfer an incoming shipment, the linked purchase order
is updated as well but the user may not have access to it.
Trigger the workflow as admin instead. opw 619775
2014-12-10 14:45:33 +01:00
sve-openerp a5d7d2072f [FIX] purchase: display only one shipping address
The warehouse location is the fallback value
Fixes #4056
2014-12-10 14:28:20 +01:00
sve-openerp 182adcdcd6 [FIX] account,sale: show payment term & fiscal position notes in reports
Complete commit 3d88a60
Display payment terms or fiscal position note instead of simple the name.
Fixes #3635
2014-12-10 14:28:20 +01:00
Olivier Dony 52fe671e61 [FIX] kanban: respect default_order when a groupby is active
The `default_order` attribute of a <kanban> view was applied
for a non-grouped kanban view, but was simply ignored when
the kanban view was grouped, a common situation.
When a groupby is active, the main order is the column being
grouped, but the `default_order` is still useful as
a secondary sort ordering, within the kanban columns.

This patch complements the original patch of
rev. 5c0804eaef from PR #520.
2014-12-10 14:14:25 +01:00
Arthur Maniet 8b6d72d8c8 [FIX] account: bank statement reconciliation widget: do not propose partial reconciliation if there are created lines 2014-12-10 14:00:42 +01:00
Arthur Maniet cc703c736c [IMP] account: bank statement reconciliation widget: remove a created line by clicking on it 2014-12-10 14:00:20 +01:00
Martin Trigaux 3695886531 [FIX] account: avoid losing product on invoice
Add restriction on product_id field to prevent the suppression of the product
if already present in an invoice.
This is to avoid the suppression of a used product variant when modifying
the list of attributes.#
Due to the constrain, the variant will be disabled instead of deleted.
Fixes #4129

Add warning message on the product form to warn users about the potential impact
of modifying variants.
2014-12-10 11:49:19 +01:00
Christophe Simonis 5d60c1c887 [IMP] base: show "mode" in ir.ui.view form view 2014-12-09 19:49:50 +01:00
Denis Ledoux c5ec6f397d [IMP] hr_recruitment: set company_id on change department 2014-12-09 17:52:21 +01:00
Olivier Dony da12f2b809 [FIX] product: pricelist: multiple corrections in UoM-related conversions
Pricelist computations need to consider 2 different Units
of Measure:
 - The default product UoM (product.uom_id), used as reference
   for the various quantities and amounts specified in each
   pricelist rules.
 - The `context UoM` is the UoM in which the result is requested,
   that is the list price UoM.

For example the 'price_min_margin' amount is meant for the unit
price of 1 x default UoM. When the context UoM is not the default
product UoM, it can be any UoM of the same UoM Category, and the
various quantities and amounts specified on the rule need to
be adapted accordingly:
  - min_quantity (expressed in terms of the default UoM)
  - price_surcharge (specified for 1 x default UoM)
  - price_min_margin (specified for 1 x default UoM)
  - price_max_margin (specified for 1 x default UoM)

The UoM corrections were not done consistently and resulted in
wrong prices when computing the price using a non-default UoM.
The cases were a conversion was needed or not were not properly
identified within the _price_rule_get_multi().

After this commit, the various code branches in _price_rule_get_multi
always ensures that:
 - price requested for: `qty` of `qty_uom_id`
 - `qty_in_product_uom` is the requested `qty` converted to default UoM
 - current (intermediary) price: `price` for  `price_uom_id`

Therefore `price` and `price_uom_id` are always in sync, and `price_uom_id`
can always be compared with `qty_uom_id' in order to know whether
a conversion is still needed.

This patch also corrects and extends the regression tests
introduced at revision 79ebe10.
2014-12-09 17:30:47 +01:00
Denis Ledoux f9ad381c17 [FIX] google_calendar: deleted excluded recurring event
Do not try to delete an excluded recurrent event added in Google, but not yet syncrhonised in Odoo (immediately deleted for instance)
2014-12-09 17:13:26 +01:00
Denis Ledoux d4f91b3f98 [FIX] google_calendar: recurrent event syncrhonization
When an attendee is added exceptionnally in an instance of a recurrent event, do not try to sync the basic recurrent event in his calendar
2014-12-09 16:34:35 +01:00
Denis Ledoux 377277c94e [FIX] account_analytic_analysis: default pricelist for contract sales order
With 'Fixed Price' enabled, a button giving the possibility to list all sale orders appears.
When browsing the list, there the possibility to create a new sale order.
The contract pricelist should be used by default when coming from this specific button.
2014-12-09 15:56:29 +01:00
Christophe Simonis a59cf39f06 [IMP] models.py: increase logging level for columns that can't be casted automatically when upgrading a module. 2014-12-09 15:39:12 +01:00
Denis Ledoux 7831fe631a [FIX] email_template: default model for save as new template feature
When sending a message with the "Compose new message" button on the right of the user menu, in the top bar, if you tried to save the message as template, you had a traceback because model field of email.template is mandatory, but was set to True because there is no model in such a case.

As there is no any relevant model in such a place, and that the field is mandatory, mail.message is pretty convenient as the default value.
2014-12-09 15:19:56 +01:00
Denis Ledoux a8f94a59cd [FIX] web: scroll handling for many2one selection
If the many2one selection height was too big (bigger than the browser page), it wasn't possible to see all options, because the body is set as overflow: hidden;

Moreover, if you opened a many2one selection and then scrolled the page, the selection moved with the scrolling, while it should be sticked to its input field
2014-12-09 14:41:26 +01:00
Cedric Snauwaert a834bd208f [FIX] stock: when putting product in pack from barcode interface, should return package_id instead of True 2014-12-09 14:25:19 +01:00
Denis Ledoux 9f9e7ef0e1 [FIX] web: user lang has the priority on partner lang
Potentialy, the timezone too.

On item action click (such as menus in More.. and Print..), the data in form view had the priority on user context (through the sidebar_eval_context)

Therefore, if a field "lang" was present in the form view (like in partner form), the web/action/load xmlrpc call was using the partner language instead of the user language.

Example of wrong use case before the fix:
 - Set the user language in French, then go to a partner form of a partner with English set as language
  - Click on any button of the partner form, such as the "Invoices" button, notice that the last item of the breadcrumb is in English, instead of Frenh (the user language)
  - Click on any menu opening a wizard in the More.. dropdown menu, notice that the wizard title is in English instead of French
  - Print any report from the Print dropdown menu, notice that the report file name is in English. If you print the same report for the same partner but from the list view, the report file name is in French.
2014-12-09 12:52:20 +01:00
Jeremy Kersten 0173e5ec35 [FIX] website_blog: fi xbanner in demo data 2014-12-09 12:50:27 +01:00
Aaron Bohy a7ab5a4109 [ADD] Packaging: Debian and CentOS Dockerfiles for nightly builds tests
This way we'll be using docker cache to spare dependencies download time.
2014-12-09 12:33:56 +01:00
Aaron Bohy a700a1139e [ADD] Packaging: also publish source dist .zip file 2014-12-09 12:16:06 +01:00
Martin Trigaux 21fe55dfd2 [FIX] (portal_)project_issue: remove duplicated field
Field priority in kanban view was present twice which made inheritance harder
2014-12-09 11:23:21 +01:00
Josse Colpaert 74ae1d563a [MERGE] purchase: speed up cancelling procurements, add test, hide lot in quick inventory update
Manual re-merge of following commits, to fix mainline history:
  3ea978bc11
  f76d714fb9
  c12f4efc53
2014-12-09 11:00:32 +01:00
Josse Colpaert 7bee5918eb [IMP] No lot in qty update as it is only confusing #3984 2014-12-09 09:56:31 +01:00
Josse Colpaert 7c1df8cdfd Merge branch '8.0' of github.com:odoo/odoo into 8.0 2014-12-09 09:54:04 +01:00
Josse Colpaert f76d714fb9 [IMP] Cancelling of procurements related to purchase orders should check state/UoM of the purchase order line + optim action_cancel
[IMP] Add tests

[IMP] Clean up
2014-12-09 09:48:31 +01:00
Josse Colpaert bacd8a189b Merge branch '8.0-wmspurchaseproccanceloptim-jco' of github.com:odoo-dev/odoo; branch '8.0' of github.com:odoo/odoo into 8.0 2014-12-09 09:47:09 +01:00
fka-odoo 3ea978bc11 [IMP] crm_partner_assign: add field assigned_partner_id in view
website_customer filters the partners based on assigned_partner_id (the list of
customers that were impletemented by another partner). This field was not
visible so no way to actually display a partner in this list.
Fixes #430, opw 619254
2014-12-08 18:27:58 +01:00
Denis Ledoux cf4c826aa7 [FIX] website_sale: set partner lang according to website lang
On ecommerce checkout, the language of the partner wasn't set according to the language in which he is visiting the website.
Therefore, its partner was set with the default language (English in most cases), and any emails sent to him were not translated in his own language (in the email templates, such as the quotation email he received on order confirmation)
2014-12-08 17:50:34 +01:00
Christophe Matthieu f2c5946051 [FIX] tour.js: popover position when scrolling down 2014-12-08 17:16:22 +01:00
Josse Colpaert c12f4efc53 [IMP] Cancelling of procurements related to purchase orders should check state/UoM of the purchase order line + optim action_cancel
[IMP] Add tests

[IMP] Clean up
2014-12-08 17:03:16 +01:00
Stéphane Bidoul c68ecbe093 [FIX] account: do not validate move when novalidate is in context
The key 'novalidate' is added in the context when an operation not impacting
the validation of a move is made. The validation recreates analytic lines
which decrease the performances.

In case of registrating a payment, the skipped validation are the one from
the reconcile method (reconciliation does not change the validity)
Fixes #3787, opw 618529
2014-12-08 16:47:47 +01:00
Denis Ledoux eba1c56f97 [FIX] web: ensure one2many field destruction on button cancel
The destruction of one2many fields is forced with the event change:effective_readonly
This revision add the forced destruction for cancel(discard) button as well

Otherwise, one2many fields are not properly destroyed when hitting the button "discard" (from save or discard).
This can be problematic for one2many editable list views (such as invoice lines) if you discard while having a mandatory field not filled in the invoice line: You can't recreate an invoice, the one2many editable list is messed up

Use case: Create an invoice, create a line, leave the description, required field, empty. Then, discard. Then, click on create.

opw-616946
2014-12-08 15:42:24 +01:00
Denis Ledoux eaef500e9d [MERGE] forward port of branch saas-3 up to 276d0e7 2014-12-08 15:04:09 +01:00
Denis Ledoux 276d0e76b2 [MERGE] forward port of branch 7.0 up to 284ca73 2014-12-08 14:57:21 +01:00
Denis Ledoux 284ca73b1c [FIX] pad: etherpad limits pad id length to 50
See https://github.com/ether/etherpad-lite/issues/1116
2014-12-08 14:47:32 +01:00
Thibault Delavallée 8c41089bab [FIX] hr_attendance: fixed filter and field having
the same name in the attendance search view. Having an action
with search_default_name in context crashed.
2014-12-08 14:42:36 +01:00
Fabrice Henrion a9b8aa3a1c [FIX] point_of_sale: typo
closes #4077
2014-12-08 09:32:44 +01:00
Xavier Morel a2115ef544 [FIX] ensure default addon paths are valid (existing)
User-provided addons paths are checked for existence (and rejected), but
default addons paths are not checked, and blow up when trying to listdir
them (e.g. when http.py tries to load modules).

This is an issue when using Odoo from the distributed tarballs, because
the packaging currently moves all modules to openerp/addons and removes
the root ("main") addons directory.
2014-12-05 19:12:33 +01:00
Denis Ledoux 4630226514 [FIX] purchase: replace widget selection by option no_create
For the same reasons as 37c805f26f
2014-12-05 17:45:09 +01:00
Denis Ledoux 9996668bad [FIX] web: get conditional user defaults
This is possible to set field conditional defaults, if the field has the attribute "change_default".
The defaults are set by the web client, by calling the method "get_defaults" of ir.values model, when the onchange is triggered on the field on which the condition is.

In 7.0, all onchanges were triggered clientside, one by one. On creation, the defaults of default_get method were pushed in the form, and then, as the values of the fields were changed (from null to the default value), all onchanges on which there was default value were triggered.

In 8.0, onchanges are performed server side, all at once. On creation, the onchange method is triggered by default (wether or not there is a default value for them), for all fields (widget param of method do_onchange of view_forms js is undefined, meaning the onchange is not triggered on a specific field, but on all fields). In such a case, we must call the get_defaults method of ir.values model for all fields (having change_default attribute), in order the conditional defaults to be set in the form view.
2014-12-05 17:41:11 +01:00
qdp-odoo 0bf69d6f82 [FIX] account: 'currency_id' field not defined on account.bank.statement object (correct name is 'currency') 2014-12-05 15:53:30 +01:00
Denis Ledoux 37c805f26f [FIX] purchase: replace company_id widget selection by option no_create
For selection fields, name_get calls to resolve the display name are client-side initiated, and will display "Unknown" if the user does not have read access to the selected company. And the reason for using a selection widget in the first place was to prevent inadvertent creation of companies. This is now doable via the no_create option, so we can remove the selection widget.
2014-12-05 14:41:30 +01:00
Denis Ledoux 38124e7e31 [FIX] sale_stock: product_id_change_with_wh on sale order popup too
product_id_change_with_wh onchange was not anymore called when using the popup form in sale order line.

The behavior was different concerning the product onchange when being in the editable list or in the popup form
For instance, for make to stock products not having enough stock, the warning was displayed when being in editable list, but not in the popup form

This is a regression of rev. 86f785ae1b

opw-619624
2014-12-05 14:00:37 +01:00
sve-openerp ff3cb41d5c [FIX] purchase: remove redundancy in report
The warehouse name and address name is often the same (name of the company).
Remove the name of the address as two warehouse may use the same address.
Fixes #4062
2014-12-05 13:51:28 +01:00
Samus CTO 55fa50891d [FIX] Use _unknown model for missing models in relation fields
During a migration of database, it is possible that some custom field
("x_", state is 'manual') are relational to model from a module that is
not provided.

Note: this used to work in Odoo 7.0 but crashed in 8.0.

Closes #3877
2014-12-04 20:58:46 +01:00
Denis Ledoux 4e9613609d [FIX] sale: rounded sales team invoiced gauge
The price_total field of the account invoice report is not rounded (it cannot be easily rounded, as this has to be done in the sql view)
In a multi currencies environment, this is possible that the price_total value has a lot of digits
We therefore round it manually, for the gauge of the sales team kanban view
2014-12-04 14:48:54 +01:00
Sandy Carter aa10972d13 Raise error on read of a browse object with bad id
Check if id is valid by searching record columns when a key error is raised
If the record has the column, the key error is actually an error on a
missing or inaccessible id.

Signed-off-by: Sandy Carter <sandy.carter@savoirfairelinux.com>

Closes #3658
2014-12-04 13:24:26 +01:00
Denis Ledoux 9c7fb721f0 [FIX] translate: allow common english 2 chars terms
Before, all isolated (between xml/html tags) two chars words coming from views were not translated (by choice).
But, for some words, allowing them is useful. For instance, the word 'or' located between two buttons.

opw-616716
2014-12-04 13:13:07 +01:00
Denis Ledoux 6629729f2d [FIX] account_analytic_analysis: tree fields access rights
Add invoicing related fields on anlytic account tree view for the invoicing group only
Otherwise, when a user not having the invoicing access rights displays the analytic account list, he gets an access right error.

opw-619485
2014-12-04 11:37:22 +01:00