Commit Graph

72023 Commits

Author SHA1 Message Date
Simon Lejeune 9ed6accd2e [REF] Packaging: Backport of v8 packaging
[REF] Packaging: backport of a7ab5a4109
[REF] Packaging: backport of a700a1139e
[REF] Packaging: backport of 9d0bd2807e
[REF] Packaging: backport of b0722d3e5d
[REF] Packaging: backport of 24b2c93814
[REF] Packaging: backport of e874cdafaa
[REF] Packaging: backport of 56b61da163
[REF] Packaging: backport of be96dd8595
[REF] Packaging: backport of 50a4da99f0
[REF] Packaging: backport of 1c41f36993
[REF] Packaging: backport of cc11331733
[FIX] Packaging: backport of 1347163082
[REF] Package: backport of 93845d683c
[REF] Package: backport of 012bc01c11
[FIX] Package: partial apply of d9e72a3716
[REF] Package: backport of 67036feff4
[REF] Package: backport of 73de0138de
[REF] Package: backport of 30d987ed30
[REF] Package: backport of 29132669a1
[REF] Package: backport of 7db12dc47b
[REF] Package: backport of f668f9c6cd
[REF] Package: backport of 2cf4051a15
[REF] Packaging: backport of 735924878f
[REF] Packaging: backport of f2598ecdce
[REF] Package: backport of fd21912cfe
[REF] Package: backport of 9a8cdf49b0
[REF] Package: backport of 2f4984b838
[REF] Package: backport of 6e9edeeb46
[REF] Package: partial backport of d4624fa826
[REF] Package: backport of 9f13722f78
2014-12-19 17:31:35 +01:00
Lionel Sausin (Numérigraphe) 10984ad49a [FIX] project: don't use planned_hours in project gantt
The gantt view does not have enough data to properly display a project's length
based on only the planned hours.
It also makes it impossible to change the project's length using drag & drop.
It's safer to simply display the start and end dates recorded in the project
Fixes #2632
2014-12-18 17:48:18 +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 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
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 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 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
Denis Ledoux 60a361cd17 [FIX]web_gantt: value rendering with decimal separator other than dot 2014-12-15 17:30:06 +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
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
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
senthilnathang ccd2f68af0 [FIX] base: Malaysian currency
Default Currency for Malaysia is MYR (Malaysian ringgit), not MXN (Mexican peso)
Fixes #4193
2014-12-12 12:22:23 +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 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
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
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
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 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
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 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
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
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
Benoit Guillot bc2a52fb28 [IMP] mrp: add prepare method for manufacturing orders to allow override
Fixes #3973
2014-12-03 10:48:23 +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
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
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
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
Andrius Preimantas de07c642b6 [FIX] base: delete parent partner reset use_parent_address
When deleting a partner with some contacts, if the contacts had selected
the "use parent address" checkbox, the address of the contacts was stucked in
readonly mode (no checkbox to disable it).
Disable use_parent_address for orphan partners.

Fixes #3611 #3613
2014-11-28 12:03:42 +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 2080ea0f0a [FIX] stock: on stock picking invoicing, allow to pick a journal if no move line 2014-11-27 13:26:57 +01:00
Sandy Carter 043f7b84b8 [FIX] base: avoid having 'False' in name of a bank
The name_get of res.partner.bank uses the format_layout to generate the name
of the bank. As every field is not required, we may get 'False' in the name.
Replace these missing values by an empty string.

Fixes #3590
2014-11-27 13:09:01 +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
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
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
Danimar Ribeiro 34da02e730 [FIX] l10n_br: remove reference to old base.group_extended group
Fixes #3879
2014-11-26 11:33:04 +01:00
Denis Ledoux 9f66f98520 [FIX] marketing_campaign: typo in manifest 2014-11-26 10:07:08 +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 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 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
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
Frederic van der Essen bb7a9dea8b [FIX] point_of_sale: fix point of sale sequence declaration, github issue #3218 2014-11-18 18:04:30 +01:00
Denis Ledoux 02270bd0fd [FIX] account: do not duplicate analytic lines on analytic journal duplicate 2014-11-18 16:27:57 +01:00
Denis Ledoux 922a52dcde [FIX] web: date autocompletion should not harcode 'date'
But should use date or datetime according to the widget type

This fix is related to 69d60465ee
2014-11-14 17:57:10 +01:00
Martin Trigaux 0a7633c11e [FIX] purchase: keep PO currency on picking
The delivery of a purchase order was not keeping the currency and cost price
from the purchase order for the reception. This was problematic for orders where
the invoice was generated from the picking (Invoicing Control: Based on incoming
shipments). The currency of the purchase order was kept while the cost was the
one in the company's currency.
It's better to keep the currency of the purchase order to make the invoice as
it's usually the one expected (and not convert everything to the currency of the
company). opw 615555
2014-11-14 17:29:40 +01:00
Denis Ledoux da15c9d27b [FIX] web: do not set the one2many dirty on field validation
This rev. 06104ba553

Added the dirty flag on the o2m field when the editor of the editable list was enabled (meaning that the editable list has been altered)) because the dirty flag was not set correctly by the one2many during the edition, at the time.

It looks like this is now the case

Besides, as now, we valid all the editable list of the form, wether or not the editable list was altered, we must not set the o2m as dirty anymore.
2014-11-14 15:52:58 +01:00
Denis Ledoux 3613b74df3 [FIX] point_of_sale: missing multi-company rule 2014-11-14 14:15:21 +01:00
Denis Ledoux 5b2f13abdf [FIX] product: more accurate name_search
First, name_search searches on default_code, then, if the limit is not reached, it searches on the product name
The results found from the default code search must be removed from the search domain when doing the search on the product name, to avoid having results already found by the search on the default_code

opw-618015
2014-11-14 13:42:52 +01:00