Commit Graph

75222 Commits

Author SHA1 Message Date
Josse Colpaert d2d4a3bb71 [IMP] When cancelling MO, cancel the procurements of the consume lines related 2014-12-17 14:58:31 +01:00
jbeficent 822466e352 [FIX] account_check_writing: correct domains on allow_check
Fixes #4269
2014-12-17 14:52:08 +01:00
Denis Ledoux 8d9473553a [MERGE] forward port of branch saas-3 up to 36bf774 2014-12-17 14:08:23 +01:00
Denis Ledoux 36bf774d20 [MERGE] forward port of branch 7.0 up to 43cf6d5 2014-12-17 14:05:44 +01:00
Denis Ledoux 43cf6d51d2 [FIX] account: aged partner balance, advance partial payment
Partners totals were not correct if the partner paid partially an invoice in advance
For an invoice of 20.000 in the future, with a payment made in advance of 5000
The column not due must contains 20.000, as the amount is not yet due
One of the column 1-30, 30-60, ... (accordingly on when the payment was made). must contains -5000
The total should be 15.000
2014-12-17 13:57:34 +01:00
Christophe Matthieu 177a08832c [FIX] website_mass_mailing: snippet animation does not toggleClass for subrscribe button. When the user click on edit snippet editor does not start animation with editable_mode true 2014-12-17 12:43:33 +01:00
Arthur Maniet 77a47a9bee [FIX] account: bank statement reconciliation: use the transaction communication in 'open balance' journal items name
Fixes #4227
2014-12-17 12:37:03 +01:00
Gaurav Panchal 998db2c61f [FIX]stock: return of 'To Be Invoiced' picking should also be invoiced
When creating a return picking, the default invoice state is 'To Be Invoiced' if
returned picking was invoiced. However if the invoice of the picking has not
been generated yet (state '2binvoiced'), the return should also be invoiced.
Fixes #4002
2014-12-17 11:52:37 +01:00
Somesh Khare ba70393bc4 [FIX] account: prevent selecting company's contacts for manual account.move.line
Only the commercial partner (parent company) should be set in partner field of
an account.move.line.
Fixes #4261, opw 618763
2014-12-17 11:24:08 +01:00
Denis Ledoux e018081b33 [FIX] stock: barcode, display pickings of active stock picking type
If a stock picking type was disabled, but had pickings in assigned or partially available state, the barcode interface main menu crashed
Because the stock picking type was not available in pickings_by_type array
2014-12-17 10:43:20 +01:00
Commandant Custo 647afdf655 [IMP] stock: Default address for the default WH
So that with minimal config, PO's have a delivery address.
2014-12-16 22:13:14 +01:00
Denis Ledoux cd4bb69550 [FIX] mail: thread messages order on show more
If click show more in a flat thread (level 0, such as under leads, issues, etc.) append messages from newer to older
If click show more in an indented thread (level > 0, such as in the messaging wall), append messages from older to newer
2014-12-16 20:10:47 +01:00
Olivier Dony dcc74a00f8 [FIX] product, sale: access rights for product.price.history
Granting read-only access to Sales/Accounting Users is useless
as all employees already have it - removed. On the other hand
Sales Managers need write access to it in order to create
products, and they need it even when `sale` is not installed,
e.g. with `account` only.
Moved this access right to `product` module. The Sales
Manager group is defined in `base`, so that works.
2014-12-16 16:16:38 +01:00
Olivier Dony 9a099ff017 [FIX] sales_team: spellchecking module description 2014-12-16 16:16:38 +01:00
Denis Ledoux 36af222569 [FIX] crm_partner_assign: more precise geolocation
Google api geolocation service returns a precise latitude and longitude, greater or equal than 5 digits
The precision is important as storing 2 digits instead of 5 can lead to an inaccuracy of allmost half a mile.
2014-12-16 15:53:32 +01:00
Denis Ledoux 7a75ab72f3 [FIX] payment_buckaroo: pudb introduced during dbe93ab022
Yes, shame on me. You can laugh.
2014-12-16 15:07:43 +01:00
Denis Ledoux dbe93ab022 [FIX] payment_buckaroo: partner lang can be set to False 2014-12-16 15:05:00 +01:00
Denis Ledoux 4a3e5df93a [FIX] web: autocomplete selection not hidden
Appending the autocomplete selection too close from the input field leads to display (hidden) problem in some cases (Many2one inside modals views, many2one at the end of a form view, etc.)

This is related to rev. e1cde4d038

closes #4268
2014-12-16 13:21:07 +01:00
Gaurav Panchal a9b4c56343 [FIX] purchase: supplier invoice and purchase order count
Value of purchase_order_count and supplier_invoice_count should be coherant with
the behaviour of the button on partner form: count records for the contact of
the company as well.
Fixes #4224
2014-12-16 12:28:08 +01:00
Denis Ledoux e2ea82506e [FIX] payment_buckaroo: api expects iso culture as language param
IT looks like this is the code we use in partner lang, by replacing the '_' (underscore) by '-' (dash)
2014-12-16 12:14:16 +01:00
Denis Ledoux e6568e0d8c [FIX] payment_buckaroo: dynamic lang & test params
test flag is set according to acquirer environment
lang is set according to partner language
2014-12-16 12:06:59 +01:00
Martin Trigaux 7a13e9d744 [FIX] point_of_sale: account selection for payments
Registered payment uses the partner receivable account. As this field is
a property field, it will select different accounts based on the user that
registers the payment (in multicompany).
Should use the company of selected journal instead of the one of the user.
2014-12-16 10:53:30 +01:00
Denis Ledoux 77f8010c91 [MERGE] forward port of branch 7.0 up to f833d2e 2014-12-16 10:52:43 +01:00
Denis Ledoux f833d2eacd [FIX] web_gantt: duration in business days if delay not set
delay already being the hours amount in business hours

opw-620189
2014-12-16 10:49:18 +01:00
Martin 9ee4ba8098 [FIX] website_mail: avoid error when message.body is empty 2014-12-16 10:42:37 +01:00
Denis Ledoux ecd8f63d75 [MERGE] forward port of branch 7.0 up to 60a361c 2014-12-15 17:34:21 +01:00
Denis Ledoux 60a361cd17 [FIX]web_gantt: value rendering with decimal separator other than dot 2014-12-15 17:30:06 +01:00
Commandant Custo 633df8dc92 [FIX] product: find products of subcategories
When searching products for a specific category, display the products of the whole category subtree.
2014-12-15 17:05:23 +01:00
Christophe Combelles e38974c5b6 [FIX] mail: access link generaTION
Catch only the error related to the access of the linked record.
Previous was hidding error to access the ir.config_parameter and eventual other
errors from the orm.
Uses SUPERUSER_ID to access instance URL (e.g. portal has no access to it).
Fixes #4234 #4234
2014-12-15 14:08:14 +01:00
Christophe Matthieu 633ec310a4 [FIX] website_instantclick: this lib create some bug because the odoo assets are loaded in the body and some event are binded more of one time. Change the js lib because the xml can't be change in 8.0. TODO: move assets into the head and fix js files and remove this commit in master 2014-12-15 13:46:29 +01:00
Jeremy Kersten 42fbb5fd71 Revert "[IMP] calendar: Set default value for start* and stop* date/datetime. Else field.function start and stop are not setted by default while they are required."
This reverts commit b1adf3a95e.

Not so simple, 'search' don't find recurrent events with this change
2014-12-14 22:43:29 +01:00
Denis Ledoux 4e617069a3 [MERGE] forward port of branch saas-3 up to 82109d9 2014-12-12 19:29:45 +01:00
Denis Ledoux 82109d9ba8 [MERGE] forward port of branch 7.0 up to 5aa128c 2014-12-12 19:29:16 +01:00
Denis Ledoux 5aa128c13a [FIX] account: accurate amount total due with partial reconcile
This is related to rev. db98434e85

rev. abe5c803a0 forgot some partial reconciliations when the date domain was other than BETWEEN (for instance, <= stop date or >= start date, alone, not between)
Besides, the rev. abe5c803a0 did not care about account move being posted or not.

rev. db98434e85 took several times the same partially reconciled moves lines
2014-12-12 19:28:19 +01:00
Jeremy Kersten b1adf3a95e [IMP] calendar: Set default value for start* and stop* date/datetime. Else field.function start and stop are not setted by default while they are required. 2014-12-12 17:09:53 +01:00
Simon Lejeune 08604812d8 [FIX] Report: html escape the error json string
session.get_file appends the json to the body of the generated iframe and
then tries to json.parse it by reading contentNode on the body.
Exceptions from `report_download` method may contain `<` and `>`, so when
json.parse tries to json.parse the contentNode, it reads only a part of
the original json string. htmlescaping the json string solves the issue
by preventing the content of the json string to be interpreted as html.
2014-12-12 16:04:31 +01:00
Simon Lejeune 80bb4422be [FIX] Report: don't shallow exceptions in report_download 2014-12-12 16:04:31 +01:00
Denis Ledoux 8ef286a12c [MERGE] forward port of branch saas-3 up to 162eb84 2014-12-12 15:46:54 +01:00
Denis Ledoux 162eb84438 [MERGE] forward port of branch 7.0 up to f46fa1d 2014-12-12 15:44:44 +01:00
Denis Ledoux f46fa1d026 [FIX] sale_margin: margin handle included taxes for sale
Another fix should probably be build for purchase price, but it isn't that easy, we need to know the partner to which the product has been purchased, as taxes are partner/country dependent.

Besides, included taxes in purchase prices happen less often.
2014-12-12 15:41:37 +01:00
Christophe Simonis 0b6078dfea [IMP] base: apps integration 2014-12-12 15:11:08 +01:00
Christophe Simonis 68134d38a3 [FIX] auth_oauth: ignore "debug" argument when converting fragment to query string 2014-12-12 15:11:08 +01:00
Martin Trigaux 5f41325271 [FIX] gamification: prevent creating goal manually
Fixes #4196
2014-12-12 13:53:46 +01:00
Denis Ledoux 9b72e70bba [FIX] mail: 1000 as limit for wall messages is a little bit too high.
Just a little bit.
2014-12-12 13:41:16 +01:00
Denis Ledoux 2bebba76d0 [FIX] website: image_url fallback when no write_date 2014-12-12 13:09:07 +01:00
Aaron Bohy da1e9412f8 [FIX] web: typo in Database Manager screen
closes #4205
2014-12-12 12:55:50 +01:00
Paulius Sladkevičius 2e083e88d8 [FIX] account: open Monthly Turnover partner in graph mode
Tree view gives no information
Fixes #4195
2014-12-12 12:16:56 +01:00
Josse Colpaert 723f532e57 [IMP] Changing product qty on product form should work with serial numbers like in 7.0, but we should explain it
Closes #3984
2014-12-12 10:48:00 +01:00
Arthur Maniet 562fc998bf [IMP/FIX] account: bank statement reconciliation widget: adopt a more logical approach to reconciliation balancing, as explained in https://github.com/odoo/odoo/issues/4017#issuecomment-66599534
Fixes #4017
2014-12-11 17:18:16 +01:00
Martin Trigaux c3de121988 [FIX] stock_account: avoid getting 'stock.picking()' as reference
In the new api an empty recordset converted to string is the name its class
while previously it was converted to an empty string.

The valid v7 condition sould have probably been
    move.picking_id and move.picking_id.name or False
but in v8, simply move.picking_id.name is enough and avoids getting these
accounting entries strangly named when there is no picking.
2014-12-11 17:01:05 +01:00
Denis Ledoux bdd5ec8216 [FIX] stock: reload after stock picking scrap
If a wizard is launched from an embedded view list, only the record of the line from which the wizard was launched is reloaded after closing the wizard.

In this specific case, as new lines are added to the picking, we need to fully reload the stock picking
2014-12-11 15:59:13 +01:00
Frédéric van der Essen bb913d0a8f [FIX] point_of_sale: the search in product or partners could crash if there were a number followed by a colon 2014-12-11 15:42:51 +01:00
Martin Trigaux 940b5beb26 [FIX] purchase: cancel PO lines and set related procurements in exception on cancelation of a PO 2014-12-11 14:15:56 +01:00
Denis Ledoux a6212d2d20 [MERGE] forward port of branch saas-3 up to e11d1c2 2014-12-11 14:11:33 +01:00
sve-openerp d347e9c28c [IMP] sale,purchase: harmonize address layout in qweb reports
Shipping and invoice addresses header are now bold and sticked to the related
address.
2014-12-11 13:38:01 +01:00
Denis Ledoux a69076851a [FIX] crm: do not assign a salesteam to a lead if not in multi sales team env
on_change_user was used to assign the first team  in which the user is a member to the lead
When the user does not use the multi sales team, it therefore set a default sales team, but invisible to the user.

Stages displayed in the kanban view are the lead sales team stages. In a non sales team env, only stages with no stages are displayed for new leads
If you added a new stage, in the kanban view, the stage is not assigned to a team
2014-12-11 13:26:07 +01:00
Denis Ledoux e11d1c2b7a [MERGE] forward port of branch 7.0 up to db98434 2014-12-11 12:15:09 +01:00
Denis Ledoux db98434e85 [FIX] account_aged_partner_balance: accurate total
In some cases when the move was partially reconciled, the amount of the move wasn't added to the total
This is related to rev. abe5c803a0
2014-12-11 11:44:52 +01:00
hiekmann ed21177044 [FIX] payment_ogone: typos in comments
closes #4166
2014-12-11 10:55:55 +01:00
Josse Colpaert 8a26a88033 [FIX] When all_op_processed False it should still create the links #4149
Fixes #4149
2014-12-11 00:25:23 +01:00
Denis Ledoux e1cde4d038 [FIX] web: 558efacead not working for modals.
The above revision, which was already a patch for rev. a8f94a59cd, did not work properly for modals, like the use template many2one field of the mail.compose.message wizard.

We therefore append the ui-menu selection nearer to the input field.

$el.parent().parent() looks odd, but the goal is to append this selection ui just after the parent of the field, but as jquery ui autocomplete only accepts appendTo (and not after()), we append it to the parent of the field parent.

This fix has been verified for
 * many2one fields in classic form view (with or without sheets)
 * many2one fields in editable list view (embedded in form view or not-
 * many2one fields in wizard modals
 * many2one fields of the bank statement reconciliation widget
2014-12-10 21:45:28 +01:00
Martin Trigaux 1bac2692e8 [FIX] account_analytic_plans: correct call to account_get
The account_get method has the signature
  def account_get(self,... company_id=None, context=None)

so should use positional argument context=context.
Added missing company_id parameter.

Fixes #4084
2014-12-10 18:46:00 +01:00
Denis Ledoux af8a6096c9 [FIX] google_calendar: typo, Google is not plural 2014-12-10 17:31:45 +01:00
Denis Ledoux ebca88defc [FIX] google_calendar: All exceptions types do not have read method 2014-12-10 17:31:45 +01:00
Guewen Baconnier 7ede1bc1c6 [FIX] sale: copy sales team on the invoice from a sale order
Follows 31a01ea, propagation of some fields from sales orders to invoices (when
created on deliveries) have been added but it missed the section_id field (Sales Team).
Fixes #4155
2014-12-10 16:30:08 +01:00
Guewen Baconnier d4569a1628 [MERGE] l10n_ch: update the Swiss chart of account to the 2015 version
Also adds 2 financial reports: Balance sheet, Profit and Loss
Fixes #3992
2014-12-10 16:13:08 +01:00
Denis Ledoux 558efacead [FIX] web: retro compatible patch for a8f94a59cd
Some views are not appended to the element oe_view_manager_body, such as client actions views.
For these cases, we append the element to the view manager element

Besides, we set the appendTo option of jquery ui autocomplete after a first initialization, because of a Jquery ui bug:
http://bugs.jqueryui.com/ticket/8858
2014-12-10 16:10:00 +01:00
Ravi Gohil b035cfb7e9 [FIX] email_template: missing translations in email template
When composing an email based on an email template, some parts of the template
(the result of name_get on fields) were not translated.
This was due to missing language in context when rendering the template.
Fixes #3708, opw 617309
2014-12-10 15:56:57 +01:00
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
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
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
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 7bee5918eb [IMP] No lot in qty update as it is only confusing #3984 2014-12-09 09:56: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
Thomas Rehn af905d0797 [FIX] implement pre-ordering of ESCPOS commands 2014-12-08 19:35:16 +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
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
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
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
Denis Ledoux 04f3fffdb4 Revert "[ADD] purchase: average price computation test"
This reverts commit 5f9280e854.

These tests have been introduced in 7.0/saas-3, but can no longer be applied in 8.0, as they uses models that do not exist anymore in the new wms.

if such tests do not exist yet in Odoo 8.0, then these tests needs re-work, they cannot be applied like that

Conflicts:
	addons/purchase/tests/test_average_price.py
2014-12-04 10:20:55 +01:00
Alexis de Lattre 80d4be0af9 [FIX] Fixes #4026 on discount barcode in POS 2014-12-03 22:14:18 +01:00
Christophe Simonis 5ca7fa18fc [MERGE] forward port of branch 8.0 up to 31a01ea 2014-12-03 19:24:57 +01:00
Christophe Simonis 7c49c6d79d [FIX] purchase: do not use deprecated api 2014-12-03 18:40:36 +01:00
Alexis de Lattre 31a01ea772 Fixes #3851 Create invoice from picking copies some parameters from the order to the invoice 2014-12-03 17:53:25 +01:00
Christophe Simonis 2ed212dcbf [MERGE] forward port of branch 7.0 up to d6daf5f 2014-12-03 17:51:06 +01:00
Holger Brunn 8eae018b27 [FIX] mrp: keep traceability of procurement.group
Pass group_id information when a manufacturing order is created from
a procurement to keep a better traceability and know the reason of stock.move
creation.
Fixes #4019
2014-12-03 17:30:44 +01:00
Cedric Snauwaert d6daf5fa2f [FIX] product: add store=dict to field name_template
Recompute the name_template field if the template changes.

backport of 41628fc + f25c5d8 to 7.0 plus some optimisations in triggers
Fixes #3277
2014-12-03 16:39:14 +01:00
Adrien Peiffer def9222bd9 [FIX] Fix wrong unit price on invoice genereted by stock picking when uos is used
[IMP] Rounding not necessary
2014-12-03 16:23:56 +01:00
Mart Raudsepp 7a979b2d3e [FIX] Fix floating point handling in purchase _prepare_order_line_move
Without this better floating point handling, an extra stock move might
be created for zero quantity for some order lines upon PO confirmation,
because qty is equal to something closer to e.g 1.14e-13, but this is
larger than 0, so it creates a stock.move, which gets rounded too late
to 0.0

Closes #3346
2014-12-03 16:10:58 +01:00
Mart Raudsepp 05de60cbf9 [FIX] Correct floating number handling for _procure_orderpoint_confirm
Fixes comparison with min_quantity orderpoint in scheduler - basic floating
point math issue in procurement scheduler when comparing current quantity
with orderpoint minimum quantity. In certain cases floating point comparison
could result in e.g 400.0 < 400.0 == True due to typical floating point
comparison issues, as Odoo doesn't use Decimal types where the issue
doesn't exist.

Fixes early exiting out of the loop cycle, in case qty is already near zero.
Fixes the new procurement creation check, to not do that if it's close
enough to zero already, to be considered a floating point math error, not
really non-zero.

These combined (or at least the last one) avoid each supply_method == buy
pending in draft PO's getting a zero quantity extra procurement order each
time the scheduler runs. Otherwise there could be hundreds of zero quantity
procurement orders pending, which makes the confirming of the PO take hours,
due to creating hundreds of stock moves for each order line.

Use float_compare helper to solve all these with floating point type for now,
instead of the more evasion possibility of converting to Decimal module.
Two potential bad comparisons remain, add FIXME notes for now until further
analysis.

Also: Float rounding on reste when comparing and on the procurement qty
2014-12-03 16:10:58 +01:00
Alexis de Lattre a300b6e3e7 [FIX] delivery: display the label of the field number_of_packages
Fixes #4011
2014-12-03 15:34:51 +01:00
Martin Trigaux a765876ffb [IMP] web: do not fully hide pager in grouped view
When the list view is grouped, the page count should be hidden as irrelevant.
However if it's fully hidden, the limit can no longer be changed.
Instead of hidding the pager, this commit hides the arrows and replaces
the content by the current limit to allow to be changed.
2014-12-03 15:02:36 +01:00
Grover Menacho c7b6a96239 [FIX] action_confirm was not asking for purchase pricelist, otherwise it was asking for sale pricelist 2014-12-03 11:28:59 +01:00
Benoit Guillot bc2a52fb28 [IMP] mrp: add prepare method for manufacturing orders to allow override
Fixes #3973
2014-12-03 10:48:23 +01:00
Josse Colpaert b6f3795e33 [IMP] Manufacture should be by default in all warehouses 2014-12-03 10:13:46 +01:00
Julien Legros 5f9280e854 [ADD] purchase: average price computation test 2014-12-02 19:33:23 +01:00
Julien Legros bfadcdd5d6 [FIX] stock: compute average price on action_done
The average price computation is now deduplicated and moved to
a separate function called in stock_move action_done.
This makes sure it is always called when a stock.move is
processed, even without going through the partial picking wizard.

Fixes #2991
Closes #3949
OPW-615491
2014-12-02 19:32:49 +01:00
Josse Colpaert 536d00d2ba [FIX] Avoid endless loop when doing a return picking 2014-12-02 18:54:25 +01:00
Christophe Simonis bc24d1b010 [FIX] product: force empty view_id for action `product_variant_action` 2014-12-02 17:45:31 +01:00
Mario Arias Badila bd2633753d [ADD] pyeval: date.replace method
Needed to create filters like "previous month"

It was just defined for "datetime", but is also needed for "date"

closes #2915
2014-12-02 16:59:24 +01:00
Denis Ledoux 2592f149a0 [FIX] mail: model can be None or uninstalled
This is related to rev. 83b28737e9
2014-12-02 16:50:45 +01:00
Josse Colpaert 8c8056d95f [IMP] Query should pass through orm and as such the refreshes can be removed in the code, which will go faster as it is done automatically by the new api 2014-12-02 16:38:36 +01:00
Denis Ledoux 83b28737e9 [FIX] mail: no_auto_thread default True if the model has no mail.thread 2014-12-02 16:06:51 +01:00
Josse Colpaert c255fe3384 [IMP] Add a method half-up for uom conversion in case we want to convert from default UoM to something else + remaining_qty round + default factor on UoM 2014-12-02 15:51:58 +01:00
Josse Colpaert 49c8fc21ba [FIX] When creating a procurement from a move, respect the right UoM conversions 2014-12-02 15:51:58 +01:00
Josse Colpaert bb45636ba7 [IMP] When preparing pack operations, use the smallest UoM of the moves if they are smaller than the default UoM. Otherwise use default UoM.
The same is done when extra moves are generated.  It is going to check if the UoM of the operation is smaller if it has one.

Throw an error when a key can not be found in action_done because there were links on a move
that was not supposed to be done (e.g. 0.5 Dozen when Dozen is rounded at 1)

[IMP] Throw an error when a key can not be found because of UoMs/picking + extra float_compare

[IMP] Integrate remarks qdp
2014-12-02 15:51:58 +01:00
Josse Colpaert 910376a157 [IMP] Rounding of the UoM should have an unlimited precision 2014-12-02 15:51:58 +01:00
Josse Colpaert 77f8732680 [IMP] Rounding should be done on move immediately to default UoM and quants should be rounded to the default UoM + remaining_qty
[FIX] Remaining qty should each time be in the default UoM of the product

Even with different UoM we want a consistent matching between moves and pack operations.
When calculating the remaining qty on move/pack operation we always start by converting the
qty on the move/operation to the default UoM and afterwards we subtract the links between them
which will also be in the default UoM of the product.
In order to create backorders / extra moves these quantities are used.
2014-12-02 15:51:58 +01:00
Josse Colpaert 244c8ee625 [FIX] Propate propagated_from_id when reconciling negative quants to the quant that loses it
When a negative quant is created but the positive quant counterpart is reconciling
a negative quant that of course also has a positive counterpart, the latter should eventually
let its field propagated_from_id tell that it originated from the very first negative quant as the
second negative quant will have disappeared through reconciliation.
2014-12-02 15:51:57 +01:00
Josse Colpaert cf16632b44 [IMP] No digits_compute on product_qty of move + rounding on qty_available fields + add float_compare 2014-12-02 15:51:57 +01:00
Martin Trigaux 73db5b3eef [FIX] account_voucher: period selection in on_change
The find method returns a list of ids while the on_chage expects an int
2014-12-02 15:12:23 +01:00
Jeremy Kersten b21b32ed2e [FIX] website_blog: Show tag by blog. No interest to display all tag, anyway the search by tag is done for the current blog 2014-12-02 11:35:29 +01:00
Xavier Morel 184f396ea0 [FIX] web_diagram: can't mark empty strings for translations, gettext does not like empty msgids 2014-12-02 09:40:59 +01:00
Anthony Muschang 0088bd578b [FIX] account_analytic_plans: take analytic distribution into account when creating a move line from bank statement reconciliation 2014-12-02 09:24:56 +01:00
Jeremy Kersten 5d58b5551f [FIX] website_forum: use other attr than value to init select2
The backend would otherwise fail because the value has been already processed
2014-12-01 20:03:31 +01:00
Jeremy Kersten ad1ca233ca [FIX] website_forum: fix error 500 when editing an answer
Was caused by missing tags.
Also fix also backwards-compatibility for textext selection method.
2014-12-01 20:02:06 +01:00
Jeremy Kersten 3c0cf7c977 [FIX] website_forum: restore bind to onclick because CKE Editor uses it, so on('click', fun) breaks things.
Fixes bugs with z-index error on some popups (image selector for example...)
2014-12-01 20:01:00 +01:00
Olivier Dony 0ddee644d6 [FIX] website_forum: allow moderators to see misbehaving user profiles
This is to help forum moderators to fight against
spammers. It was previously difficult as the spammer
profile became unreachable as soon as their karma
went below 1, even if they had other questions
or answers still published.
2014-12-01 19:30:57 +01:00
Denis Ledoux 6f21306dba [FIX] website: responsive images in table for Firefox only
It looks there is a bug in Firefox concerning responsive images in table. See bugzilla https://bugzilla.mozilla.org/show_bug.cgi?id=975632
Bootstrap advises to use width: 100% for .img-responsive as workaround were needed.
The @moz-document is to apply this for Mozilla only.

opw-617582
opw-618659
2014-12-01 18:28:18 +01:00
Antoine Huvelle d7a47d0d1f [FIX] analytic_user_function: inherit conflict on account type
The field account_id was inherited with position="replace" meaning we erased
future changes made into hr_timesheet_sheet (41f2eba missed "type in []" and
65f31b9 missed use_timesheets).
Replace by position="attributes" to only change what matters: the on_change.
Fixes #3974
2014-12-01 17:43:59 +01:00
vrenaville 13d0934f34 [FIX] account: chart of account opening period selection
If a special period is present, it must be selected fist
Fixes #3946
2014-12-01 17:38:29 +01:00
Martin Trigaux b3060f2771 [FIX] website: can not change website name
The website name is by default "localhost" (used in the page title in the format
"Current Page | Website Name") but there were no way to change it.
Fixes #3493
2014-12-01 16:50:51 +01:00
Frédéric Van der Essen 02bdbee088 Merge pull request #3009 from initOS/8.0-fix_escpos_with_non_rgba_image
Bug: Exception when printing POS receipt via hardware proxy
2014-12-01 15:55:17 +01:00
Frédéric van der Essen d700c78c56 [FIX] point_of_sale: correctly handle various xmlrpc errors that appear in offline mode 2014-12-01 15:46:29 +01:00
Christophe Simonis d37dd37059 [MERGE] forward port of branch saas-3 up to e1e7dc0 2014-12-01 15:42:51 +01:00
Christophe Simonis e1e7dc0af9 [MERGE] forward port of branch 7.0 up to 419d934 2014-12-01 15:33:48 +01:00
Denis Ledoux 64fd5288c8 [FIX] account: There is no sale_refund nor purchase_refund analytic journal
During rev. cbe2dbb, type2journal was refactored, and set as a global variable in the top of the file, as it was use everywhere accross the file.
But, in this specific method _get_journal_analytic, this type2journal dict wasn't the same as everywhere else, as you can see at rev. d2ff95f for example. We must therefore set a specific type2journal dict for this specific method.
2014-12-01 15:31:12 +01:00
Eddy Ernesto del Valle Pino 419d934143 [FIX] base_calendar: meetings email notification recipients
Reminder emails are generated based on the list of attendees.
The email_to field used to be a string with a list of emails separated by spaces
while the comma is the valid separator (RFC2822).
Fixes #3933 #3784 #2033
2014-12-01 14:53:13 +01:00
Ravi Gohil 1fe6e8172d [IMP] website_mail: mailing editor buttons
Button "Save and continue" was wrongly named as it worked only once the template
is not in edit mode (so already saved).
Hide the button to only get it in readonly mode and rename it for better
understanding of its purpose. (opw 614563)
2014-12-01 11:45:43 +01:00
Jacques-Etienne Baudoux aba75e7578 [FIX] base: oe_subtotal_footer_separator width
Make sure a too long value in the subtotal will not overlap the form sheet
Fixes #3698
2014-12-01 10:42:36 +01:00
Géry Debongnie 29f895f947 [FIX] fix editing one2many in some cases (web)
See issue #3964 for more detail.  Main problem was caused by commit
f0e331e005.  It set the key name+'__display' to false when reloading
a record for all field types, but it was only concerned with many2many.
2014-12-01 10:29:00 +01:00
Loïc Bellier cdce2e2283 [FIX] stock: Never hide the invoice control on pickings
Invoice control field was invisible, and we cannot change value if none selected or copy picking in.
Fixes #3636
2014-11-28 17:55:48 +01:00
sve-openerp b747b3d30b [IMP] product: usability improvement in pricelist
Explicitly specifiy that quantities are in product uom
2014-11-28 15:50:57 +01:00
Christophe Simonis ec30b21336 [MERGE] forward port of branch 7.0 up to de07c64 2014-11-28 15:16:38 +01:00
Amit Vora 4bf9dc4078 [IMP] [FIX] website_blog: better follow mechanism. Now people following
a blog will receive notifications only for published posts. They
will not receive all comments of all posts anymore.
When commenting a post users will receive the answers.

Added tests to try to test this behavior.
2014-11-28 15:12:14 +01:00
Géry Debongnie 3078cfbbd1 [FIX] remove filter for new leads/opportunity (crm)
requested by fp. the filter is wrong and not very useful from a
functional viewpoint.
2014-11-28 14:26:25 +01:00
Denis Ledoux 45551cf78c [FIX] web: use mutex to wait for onchanges
This fix is related to c12a2e1d16

Mutex allow to wait sequentially for mutex
Besides, if one of the onchanges deferreds fails, it does not resolve the mutex until all deferreds of the mutex are resolved.

Besides, we now wait for the onchanges mutex between each field commited value (line 596) in case the commited value leaded to a new onchanges, that we should wait for before commiting the rest of the values.
2014-11-28 13:39:47 +01:00
Akash Balar d4027e6182 [IMP] account: account.statement.operation.template model
- better many2one ondelete strategies
- domain set on fields, not views
- added domain on analytic_account_id field
2014-11-28 08:42:01 +01:00
Arthur Maniet d7a46b4d84 [FIX] account: floating point comparisons in get_reconciliation_proposition 2014-11-28 05:20:09 +01:00
Christophe Simonis 5f47fc84e9 [FIX] web: m2o search facet do no set `default_*` context key for "name_search" values 2014-11-27 17:06:48 +01:00
Olivier Dony fc85a7ee5c [FIX] product: remove unnecessary UoM rounding step, add missing test
Remove the intermediate rounding inside _compute_qty(), as it
is not necessary after rev. fa2f7b86 and has undesired side-effects.

An extra float_round() operation inside _compute_qty()
had been added at rev. 311c77bb to avoid a float representation
error in UoM factors that could bias the ceiling() operation
done as the last conversion step.

Example 1:
Dozen has a factor of 1/12, which was previously stored in the
database with a decimal accuracy of 12 significant decimal digits.
This meant the factor was exactly stored as 0.08333333333333.
When reading this back into a Python float, the precision was not
sufficient, and the UoM conversion of 1 Dozen to Units gave a
result of 12.00000000000047961...
After the final ceiling() operation to Unit's rounding, the
converted value ended up as 13.

This problem was initially solved using an extra rounding.

However at revision fa2f7b86 the decimal precision used to store
UoM factors was increased to preserve all significant digits.
This added the extra precision necessary to read the Dozen factor
back into an accurate float value of 1/12, and the conversion of
1 Dozen now gives 12.0 Units, even without the intermediate
rounding operation. (Works for other factor values too)

At the same time that extra rounding operation has undesired
side-effects, as it requires a fixed precision derived from
the rounding precisions of the UoMs. But there is no given precision
that would work in all cases for this intermediate value. It is
always possible to find a valid combination of UoM roundings
that breaks that intermediate step, e.g. by forcing integer
roundings.

Example 2:
Let Grams have a rounding precision set to 1 because no smaller
quantities are allowed, and Kilograms a rounding of 0.001 to allow
representing 1 Gram. (gram factor = 1000 and kilogram rounding = .001
by default)
If we try to convert 1234 Grams into Kilograms, the extra rounding
introduced in 311c77bb will cause a rounding of 1234.0/1000.0 at
the precision of Grams (1), which gives 1.0 as a result.
The net result of this conversion gives 1234.0 Gram = 1.0 Kilogram,
while the correct result (1.234 Kilogram) is perfectly compatible
with the UoM settings.

Similar errors could be triggered with various rounding settings, as
long as the intermediate rounding needs a finite precision.

Two extra tests have been added to cover Example 1 and Example 2.

--
Related to #2072, #1125, #1126, #2672
Closes #2495, #2498
2014-11-27 16:44:34 +01:00
Denis Ledoux 15d87a1732 [FIX] web_graph: pass context to fields_get for translation
In graph views, fields from the pivot table were not translated in the user language
We pass the context, containing the user language, to fields_get in order to get the translation
This is also done by the search view, in search.js line 1978 at this rev.

opw-616713
2014-11-27 16:06:05 +01:00
Denis Ledoux 62bc63e44f [FIX] web: force company_logo change on company change
In multi company environment, the company logo was not updated on company change in the user preferences
This disrupted the end user, as he might think the company change did not happen.
2014-11-27 15:21:25 +01:00
Denis Ledoux e347011f24 [MERGE] forward port of branch 7.0 up to 2080ea0 2014-11-27 13:27:37 +01:00
Denis Ledoux 2080ea0f0a [FIX] stock: on stock picking invoicing, allow to pick a journal if no move line 2014-11-27 13:26:57 +01:00
Mohammad Alhashash 2461baa0dd [FIX] stock: prevent serial number deletion on stock.move
prodlot_id field may be required due to constraint `_check_tracking`.
When a stock.production.lot is deleted, the constraint on linked stock.move is
not checked. To avoid inconsistency, restrict the suppression.
To allow the modification of existing stock.move, remove the states attribute on
the field definition.

As removal of serial may impact the traceability, it makes sense on buisness
point of view to force the modification of previous stock.move, even if the
constraint would not have been violated.
The list of linked stock.move is present on the serial form view making
the operation easier.

Fixes #3560, lp:1176912
2014-11-27 12:47:41 +01:00
Denis Ledoux 117d0d0ca2 [FIX] sale_margin: stored field functions cannot trigger other stored field functions
the update of sale.order margin field was trigger with the margin stored field of sale.order.line: This cannot work with the old api
2014-11-27 12:06:19 +01:00
Will Stott c854404a2c [FIX] purchase(_requisition): typo negociation -> negotiation 2014-11-27 10:36:55 +01:00
Olivier Dony 9bc712b075 [REV] product: rev. 42f5114 needs further review
Incorrect use of stock.move in product module + needs review.

This reverts commit 42f511405a4efe88e3903a4b4040ec9d83e462e2:
"[IMP] When no stock moves, change whatever you want, otherwise no change at all for UoM.  #3440 Enhancement request richard-willowit"
2014-11-26 18:20:28 +01:00
Josse Colpaert 42f511405a [IMP] When no stock moves, change whatever you want, otherwise no change at all for UoM. #3440 Enhancement request richard-willowit
The default UoM can only be changed when there are no stock moves (or only cancelled ones), but to any category.
The purchase UoM can be changed whenever you want, but has to be in the same category as the default UoM.

Closes #3440

[IMP] When no stock moves, change whatever you want, otherwise no change at all for UoM.  #3440 Enhancement request richard-willowit

[FIX] Remove line

[FIX] Constraint should be applied when UoM or PO UoM is changed
2014-11-26 18:01:00 +01:00
Jeremy Kersten 0313218123 [FIX] website_forum: Forum, use old API in v8. forum was not a browse record, so we need to re-browse. Tags: Force to delete tag. Before old tag deleted was not removed from relation, Now we use a 6 to force the update, followed by 0 to create. 2014-11-26 17:44:52 +01:00
Denis Ledoux 2b0a8363d9 [FIX] sale_layout: set 0 as default value for categ_sequence
Otherwise, in some cases, the categ_sequence can be set to null, which is not ordered the same way than 0, and you won't be able to sort lines with null and 0 as categ_sequence between each others
2014-11-26 17:03:42 +01:00
Maria G fde2046d5e [FIX] hr_attendance: use float division for worked_hours field
Used to be rounded to integer while the field is a float.
Fixes #3526
2014-11-26 16:46:26 +01:00
Frédéric Van der Essen 94aded554c Merge pull request #3803 from TheCloneMaster/patch-7
POS is loading all partners, not only customers
2014-11-26 16:38:44 +01:00
Pierre Verkest f0e331e005 [FIX] correctly update many2many in listview (web client)
Fixes the issue #1216 (follow the link for more information). The issue
was caused by a hack in list view: the magical suffix __display is used
in render_cell to determine if a many2many field should be updated. This
commit simply makes sure that old many2many fields + __display keys are
cleared.

A better way would be to redesign/refactor the list view to avoid that
hack in the first place.  But this would be a much more complex task.
2014-11-26 15:42:34 +01:00
Mario Arias Badila d349723271 [point_of_sale] Domain functions to literals
Replaced domain functions with literals where there are only constants
2014-11-26 08:32:33 -06:00
Edy Kendengis 002664ed79 [IMP] stock: display company in location tree view 2014-11-26 15:32:25 +01:00
Christophe Matthieu d3c562d4e8 [FIX] product: keep attribute on a variant with only one attribute
When adding informational attribute, with only one possible value, it used to be skipped.
Instead keep it and add it on every variant.

To avoid dropping and recreating product (and lose eventual customisations), the attributes with only one possible value are set on every product.
This makes sure that in following test, these are not considered in variants_inactive variable.

Fixes #3204
2014-11-26 14:35:08 +01:00
Denis Ledoux 02f4f9a572 [MERGE] forward port of branch 7.0 up to e2dd18f 2014-11-26 12:35:36 +01:00
Denis Ledoux e2dd18f1e7 [FIX] mrp: prevent recursion from phantom boms with no lines
if the bom is phantom and has no line, we attempt to find a new bom with the default product uom
This is possible that we find the same bom that the current one
In such a case, we must not explode, to avoid recursion.
2014-11-26 12:34:45 +01:00
Tymoteusz Motylewski 856eba1de0 [IMP] website_sale: performance on category page
public_categ_ids field was moved to product.template object
2014-11-26 12:09:37 +01:00
Martin Trigaux 342ec1083e [FIX] sale_service: typo in string Thick -> Tick 2014-11-26 12:07:53 +01:00
Arthur Maniet a6de1b150c [IMP] account: bank statement reconciliation widget: allow to filter move lines on due date 2014-11-26 11:38:32 +01:00
Danimar Ribeiro 34da02e730 [FIX] l10n_br: remove reference to old base.group_extended group
Fixes #3879
2014-11-26 11:33:04 +01:00
Holger Brunn 7c070561b3 [FIX] mrp: duplicated xmlid for ir.model.access 2014-11-26 11:28:40 +01:00
Arthur Maniet 43f29b2b13 [FIX] account: bank statement reconciliation widget: correct multicurrency display 2014-11-26 11:27:46 +01:00
Christophe Matthieu 76080efdbc [FIX] website_sale: Discussion not working on product; issue: #3495 2014-11-26 10:38:38 +01:00
Christophe Matthieu 6b3777c2b6 [FIX] website_reseller: Navigation Broken for Partner List on Website issue#3522 2014-11-26 10:28:29 +01:00
Denis Ledoux 9f66f98520 [FIX] marketing_campaign: typo in manifest 2014-11-26 10:07:08 +01:00
Arthur Maniet 0003b7cd28 [FIX] account: bank statement reconciliation widget: disable buttons which trigger RPC calls until done 2014-11-26 09:44:50 +01:00
hiekmann 2a22a6151f [FIX] payment: docstring typo
closes #3557
2014-11-26 09:38:24 +01:00
Martin Trigaux e84b569fe4 [FIX] mrp_operation: missing context
It is present in mrp declaration but was not in mrp_production which was problematic if another module inherit as well from action_produce_end.
2014-11-26 09:18:53 +01:00
Denis Ledoux b499eac2ed [FIX] website: the attachment creation improvment of a3e578068e must be done on res_model
instead of type
2014-11-25 19:26:13 +01:00
Martin Trigaux 7dca12ee08 [FIX] product: comparison of currency rounding
Setting 0.0001 as precision used to be converted to 9.999999999999999e-05
precision_digits of 6 is the precision of the field 'rounding' on res.currency
Fixes #3875
2014-11-25 18:41:00 +01:00
Denis Ledoux 4ca389a1a6 [FIX] account: prevent invoice line duplication on partner duplication
If a company contact (a partner with a company set as parent) had invoices, and the company of this contact was duplicated, all the invoices lines were duplicated,  on the original invoice moreover (new lines were added on existing invoices)
2014-11-25 18:23:45 +01:00
Denis Ledoux bd338a779a [FIX] stock: typo incomming -> incoming in demo & tests
I avoid to change external ids, in case some custom/community modules use it in their own tests
2014-11-25 17:38:32 +01:00
Arthur Maniet a8ae0ffbb4 [IMP] account: bank statement reconciliation proposition:
- find a move line whose amount exactly matches the bank statement line amount even if it has no partner
- properly handle multicurrency
- if there's no exact match, look for a set of move line whose amount is <= to the statement line's amount
2014-11-25 16:48:32 +01:00
Jeremy Kersten ade51a9ea1 [FIX] survey: Was browsing a browse record, useless and traceback... https://github.com/odoo/odoo/issues/2383 2014-11-25 15:06:59 +01:00
Denis Ledoux a3e578068e [FIX] website: improve performance for attachment creation
website introduces two new stored function fields, which depend on the attachment data
The thing is, these two fields are pertinent for website attachments only
Therefore, we avoid to read the datas field when the attachment is not a website attachment(when not needed), as this is the most costly field to read
2014-11-25 14:39:54 +01:00
Géry Debongnie 20a8b0e66a [FIX] correctly set searchview id (web client)
The issue is that when a default searchview is requested, it is
initialized without its view_id.  Result: debug mode can't edit the
search view.  This commit makes sure that when the field_view_get is
received, the correct view_id is set.
2014-11-25 13:11:15 +01:00
Denis Ledoux 73f7a2ba35 [FIX] project_timesheet: date of created analytic line not in user tz
When the user was in timezone UTC + 1, and added a project.task.work which created an analytic entry line (timsheet activity), if the datetime was set to 11/25 00:00:00, the date on the analytic line was set to 11/24, because this was the truncated stored value(UTC Time), which was 11/24 23:00:00
2014-11-25 12:33:28 +01:00
Martin Trigaux 1b4953c892 [FIX] mrp: allow to select BoM with a product template only 2014-11-25 09:55:21 +01:00
Josse Colpaert 23c010c9b4 [IMP] Incoming, outgoing and virtual quantities should not take draft moves into account 2014-11-24 22:38:51 +01:00
Olivier Dony 784665e6bd [DOC] web: search view: extra info about key events handling
Complements bde1a4432f
2014-11-24 18:50:35 +01:00
Denis Ledoux bb5d32b4b6 Revert "[FIX] stock_picking_wave: removed obsolete many2many widget from stock_picking_wave_view"
This reverts commit 436bbb0a48.

The many2many widget is usefull, as it allows to select an existing picking instead of creating a new one when clicking add an item from the list
2014-11-24 18:38:14 +01:00
Denis Ledoux 6feefe4d10 [FIX] product_extended: price from bom is build for product templates
As it sets the standard_price field, which is defined on product templates only: setting the standard price of a product variant will lead to set the standard price to all the variants of the product template.

There is therefore no meaning to compute and set the standard price of product variants according to the boms
2014-11-24 18:01:20 +01:00
Jamin Shah 1276d01f27 [IMP] account : Add reference field to Invoice report 2014-11-24 16:58:36 +01:00
Denis Ledoux 6061ccda54 [FIX] mail: batch_size expects an integer 2014-11-24 16:42:26 +01:00
Denis Ledoux bbd20dbbc5 [FIX] mail: allow to set own batch size for mass mailing 2014-11-24 16:38:12 +01:00
Martin Trigaux 4ce7af3573 [FIX] product: creation of reference uom
Set a default value for factor when creating a new uom.
Could not create a new UoM with type reference (if creates a reference uom, no need to pass a factor).

Change the readonly filter to (type = bigger) to make the field writable for reference uom.
This is needed to force the reset of the factor when switching of type (onchange_type).
As the field was readonly, kept the old value for factor.
2014-11-24 11:04:50 +01:00
Mario Arias Badila 9db0face13 POS is loading all partners, not only customers
Hi,

Adding domain to res.partner model, so POS only loads "customers"
2014-11-21 09:20:45 -06:00
Denis Ledoux 7a2ba5ca47 [FIX] website_sale: apply reduction code
The line being deleted in this revision looks to have been useful when it was introduced in this commit:
36fc910

As the sale order was updated right away through the update_pricelist method
But since this rev. 22f4c31, the sale order is updated later, and reset the sale_order_code_pricelist_id value in the session right after setting it prevent to apply the pricelist of the promotional code...
2014-11-21 15:56:37 +01:00
Jeremy Kersten cafbf0714e [IMP] website_blog: Add menu, form view and tree view to manage tags. 2014-11-21 15:53:32 +01:00
Christophe Simonis 3e2eca45cb [FIX] website_crm: contactus: do not polute lead creation values 2014-11-21 15:05:48 +01:00
Christophe Simonis 06246bac9a [FIX] crm: set the oldname of field crm.lead.medium_id 2014-11-21 15:03:12 +01:00
Josse Colpaert 8f20351ef5 [IMP] Show product_uom_qty instead of normalized quantity in mrp order report 2014-11-21 14:55:40 +01:00
Denis Ledoux 72874e1a21 [REF] mail: extract auto subscribe notifications sending into a sub-method
To allow customization, such as do not send the notification to the partner that subscribed himself to the thread (he probably already read the thread, no need to send him an email)
2014-11-24 12:15:44 +01:00
Denis Ledoux cfe89db1c9 [FIX] im_chat: unlink im chat presence on user deletion
It wasn't possible to delete a user if he had a im chat presence linked to him.
2014-11-24 11:36:10 +01:00
Géry Debongnie 5f756d2510 [FIX] yet another filter fix... (crm reporting)
Same problem as before: filters do not compose properly with the implicit
'&', and they are filtering on the wrong model (should filter on probability
in the crm.case.stage model and not on the crm.opportunity.report)
2014-11-24 09:09:34 +01:00
Simon Lejeune 467968b79a [FIX] tools: find_in_path: config is not ready at import time
commit f76d4525a was not actually working: extra keys from
config files are not yet into the config options dict at
import time. The fix is to move the logic inside the method,
like in `find_pg_tool` just below.

Also fix the use of `find_in_path` in report.py: the subprocess
may also raise AttributeError exception, so instead of listing
all the possible ones just re-raise the IOError shallowed by
`find_in_path` when the result is None.

Fixes #3809 #3811
2014-11-23 15:22:02 +01:00
Jeremy Kersten 4617f665b9 [FIX] website_editor: smallest pictogram was unselectable. 2014-11-21 18:23:22 +01:00
Simon Lejeune f76d4525a3 [ADD] tools: handling of bin_path key in find_in_path
The openerp-server.conf now generates the bin_path record, in order
to resolve calls to external binaries served in the thirdparty dir.

Adpated report.py to use find_in_path and not directly which.
2014-11-21 18:08:12 +01:00
rmu-odoo 299e39555b [FIX] payment_transfer: correctly display transfer information
When moving fields name -> provider on payment.acquire, the condition in payment_transfer was not updated.
This lead to no post_msg value in the Wired Transfert acquire.
Fixes #2423, opw 613934
2014-11-21 17:58:43 +01:00
Jeremy Kersten ef72a96de7 [FIX] google_calendar: update tuto to create credential for google Calendar API. Google changes suddenly the process. Before that was optional, now without it, customers have an error 400 redirect_uri_mismatch 2014-11-21 16:23:38 +01:00
Jeremy Kersten 8251806741 [FIX] web_calendar: improve the commit 787147d. This commit was fixing bug in other module that calendar which was open an event in popup view. Because browse/read by default was unable to read string id. The fix was too restrictif, because calendar need to read/browse string; we cannot cast this id in Int else we loose the virtual part. parseInt('12-20140512') -> 12. 2014-11-21 14:07:09 +01:00
Jeremy Kersten de641ccbf8 [FIX] calendar: allow to sort in tree view the starting date (start, start_date, start_datetime) (hack for V8) 2014-11-21 14:07:09 +01:00
Géry Debongnie bde1a4432f [FIX] fix autocompletion problems with quick presses
Problem was that when the user types quickly in the search bar and press
enter, the keydown event of the enter key happens before the keypress
event of the last key entered.  This means that the autocompletion has
a wrong string.  The fix is to move the enter selection detection from
keydown to keyup.
2014-11-21 12:04:23 +01:00
Olivier Dony cc762004ed [FIX] calendar: support non-ascii chars in date/time format
The calendar module generates string values with
a date/time formatted according to the user
language. Those formats may contain non-ascii
characters and are read as unicode strings,
but fed to str{p,t}time, which only accepts
byte strings (in Python 2).

This would cause an exception when loading calendar
notifications for a user using e.g. Chinese with
some CJK unicode chars in the date/time format.
2014-11-20 18:16:41 +01:00
Binjal Desai 4c550d73c8 [FIX] mass_mailing: attachments were not send. 2014-11-20 16:32:53 +01:00
Géry Debongnie cd1eaabe11 [FIX] fix wrong filter in opportunity view (crm)
There was two problems:
* it was filtering on the probability of the opportunity, not on the
probability of the stage
* the filters were not prefixed with '&', which means that they gave
weird results when combined in the searchview (in a filter group, filters
are combined with '|', but it breaks when the filters are defined by
an implicit '&')
2014-11-20 13:23:04 +01:00
Christophe Simonis f51d4ea6d0 [MERGE] forward port of branch saas-3 up to 6c13c8d 2014-11-20 11:37:23 +01:00
Olivier Dony a6d24db305 [I18N] Update translations from Launchpad 8.0 branches 2014-11-19 17:49:12 +01:00
Denis Ledoux 6c13c8d966 [MERGE] forward port of branch 7.0 up to 529e920 2014-11-19 14:06:48 +01:00
Denis Ledoux 529e920b2c [FIX] mrp: perform location chaining for kit exploded moves
This rev. 7307227 ensured to not (re-)set the state 'confirmed' to exploded moves with a more advanced state (for instance, 'assigned')
Nevertheless, the location chaining is performed on the move confirmation, through the action_confirm method of the stock.move model. Besides, the resulting moves of the _action_explode method had the state 'confirmed' on creation, the 'confirmed' state wasn't set by the method 'action_confirm', meaning that the moves were confirmed without having the location chaining done. Allowing moves to go through the action_confirm method even if the state was 'confirmed' or further triggered the location chaining.

Preventing already confirmed moves to go through the action_confirm method prevented the location chaining, thus.

We now create the resulting moves with the 'draft' state, and then confirm them through the procurement workflow signal 'button_confirm'. Thus, the resulting moves are confirmed by going through the action_confirm method, writing the confirmed state and triggering the location chaining at the same time. We then write the 'assigned' state if necessary.

opw-617235
2014-11-19 14:04:05 +01:00
Olivier Dony c87b9c6539 [FIX] decimal_precision: avoid refreshing float precisions at each cache invalidation
Changing the decimal precision of float fields is a rare
operation, while cache clearing occurs fairly frequently.
Signaling a full registry change when the decimal precision
is changed (instead of a mere cache change) is therefore
a better trade-off, and more semantically correct as well.
This way we avoid the decimal precision refresh for each
invalidation.

Registry invalidation implies cache invalidation.
2014-11-19 12:53:58 +01:00
Martin Trigaux 8ce89736e9 [FIX] web: force company logo refresh per db
The company_logo is cached and was not refreshed when switching between database, still showing the logo of the company of the previous database
Fixes #2738
2014-11-19 12:50:27 +01:00
Julien Legros aecb24ad6b [FIX] website_sale: don't carry over tx details on SO duplication
opw-617319
2014-11-19 11:43:02 +01:00
Thomas Rehn 7659da9fd8 improve patch according to reviewer's suggestion 2014-11-19 10:13:54 +01:00
Frederic van der Essen 6111cf9873 [FIX] hw_escpos: use logger instead of prints to avoid corrupting the odoo.py command line interface. 2014-11-18 19:03:20 +01:00
Martin Trigaux 0b2ee16885 [FIX] project: access rights and followers
For privacy_visibility 'followers' or 'portal', the user should be follower of the project (not the task).
Remove public access to portal task
Fixes #2372

If no project on the task (or other rule), an employee (not a portal) can access if is follower of the task.
Follower rule is not enough as a user creating a rule will subscribe to the rule but to subscribe to record, the user should have access to it in the first place.
To make sure the snake does not bit its tail, fallback to give access on task where the user is reponsible (user_id = user.id).
Fixes #139

Adapted the tests to the new behaviour (removed not relevant and added some on creation)
2014-11-18 18:52:46 +01:00
Martin Trigaux 0afa4c7f52 [IMP] point_of_sale: make the sequence field configurable 2014-11-18 18:52:46 +01:00