Commit Graph

93407 Commits

Author SHA1 Message Date
andreparames d4aa2decde [FIX] web: onchange compare changes using === operator
The onchange handler is doing a weak comparison between the values received from
the onchange() method and the current field value, which leads to a falsy value
such as "0000" being treated as equal to False.
This patches changes the operator to enforce non-coercive equality.
Fixes #6405
2015-04-23 16:02:21 +02:00
andreparames 7ada8734bc Signed CLA 2015-04-23 16:02:20 +02:00
Daniel-CA ca556236e3 [CLA] Odoo CLA for Daniel-CA 2015-04-23 15:28:57 +02:00
Richard deMeester 555b5487c9 [FIX] account: Bank Statement Action View Sequence
Ensure correct sequence of bank statement action views.
As the views are sorted based on the sequence, make sure the tree is selected
before the form view.
Fixes #6413
2015-04-23 15:26:44 +02:00
cubells a5a9ec0c17 [CLA] cubells 2015-04-23 15:01:38 +02:00
Lionel Sausin 50cca34c3a [CLA] CLA for Numérigraphe 2015-04-23 14:57:52 +02:00
Nicolas Lempereur 81a3f56651 [FIX] stock,event,pos: fix "today" filter with regard to timezones
The previous filters didn't take timezones into account, and
returned stringified naive datetime values in local browser
time. Those would then be interpreted by the server-side as
UTC date, and depending on the current timezone offset vs UTC,
yield partially incorrect results.

By returning directly a datetime.datetime object instead of
a stringified version (see previous commit 76881fb),
we can get the expected result regarless of the timezone.

Fixes #2972
Closes #6229

opw-621282
2015-04-23 14:11:24 +02:00
Nicolas Lempereur 76881fb226 [FIX] web: backport datetime.toJSON() so we can return local datetimes in search domains
This fix adds the toJSON() method to datetime.datetime,
so domain expressions can use datetime values directly,
without having to compute the stringified version
with convoluted strftime() and timezone calculations.

The datetime results are sent down to the JSON-RPC
level where the JSON.stringify() serialization will
convert them to UTC string, to be deserialized
properly as UTC datetime values on the server side.

Thanks to this we can use the browser's local midnight
timestamp in a filter expression, for example like this:

`datetime.datetime.combine(context_today(), datetime.time(0,0,0))`

and get the expected result regardless of the user/browser's
timezone.

related to issue #2972 and pull request #2914 and #6229

(Next commit will fix them)

opw-621282
2015-04-23 14:05:56 +02:00
Martin Trigaux 5267e3a158 [FIX] portal: share with group wizard
Correctly creates menu and add implied groups.
Since the conversion from res.portal to res.group, we lost the field
parent_menu_id so a search is needed to find parent menu.
To add the access of existing users to the new groups, implied id rules are
needed. opw 612594
2015-04-23 13:53:08 +02:00
Damien Bouvy 775ecc6cad [FIX] account_analytic_analysis: fiscal position should use the get_fiscal_position() function
When automatically generating invoices, contract should browse the fiscal position by calling
the function get_fiscal_position of the account.fiscal.position class instead of checking the
property field on the partner
2015-04-23 13:35:48 +02:00
Nicolas Lempereur f2fccdfaf0 [FIX] web: allow to export unordinary table
Previously, there was an exception when exporting unordinary table (e.g:
reports) coming from the export of the xml_id.

With this change, if the table is not ordinary, the xml_id is not
present in the exported file.

closes #6428
issue #6336
opw-633066
2015-04-26 16:38:36 +02:00
Adil Houmadi f2ef46e9f4 [FIX] product: purchase report, correct warehouse
Fix stock warehouse column on purchase report,
we need to join stock_picking_type and stock_warehouse
in order to have the warehouse itself

Closes #6409
2015-04-23 13:23:40 +02:00
Adil Houmadi 30e54e4965 [CLA] Taktik SA/NV 2015-04-23 13:23:40 +02:00
Martin Trigaux 9e1100ae2f [FIX] product: pricelist specific to a product
Double list comprehension is a nice try but does not work in python.
prod_ids was a list containing only the first variant, so getting the
product-specific pricelists only for the first variant of the first template.
Fixes #2900
2015-04-23 10:38:48 +02:00
Martin Trigaux ab65c388cd [FIX] crm: list of meetings from opportunity
When opening the list of meetings from an opportunity, show only the meetings
linked to the current opportunity.
Use search_default_ to be able to remove the filter if not needed.
Remove context on meeting button as it's ignored in action_makeMeeting (and
there is no field attendee_id linked to a crm.lead anyway)
opw 614039
2015-04-23 10:00:01 +02:00
Nicolas Lempereur a8c122cd31 [FIX] ir.values: clear defaults cache when user company changes
The defaults of ir.values depends on the user company, but there is no
cache invalidation when the company of a user change.

This fix adds the clearing of the default's cache in this case.

Closes #6339
opw-629979
2015-04-22 18:50:43 +02:00
Denis Ledoux 8c40bdd410 [FIX] account_cancel: reload whole bank statement on transaction canceling
When canceling a bank.statement.line of a bank.statement
ready to be closed
(all lines reconciled,
reconcile button hidden and close button visible)

The form wasn't reloaded, and the reconcile button
was not displayed after having cancel the statement line

opw-632063
2015-04-22 18:22:51 +02:00
Denis Ledoux 84e10ad03b [FIX] web: translation of default M2O values in search bar
When a many2one field of a searchview was selected
by default, through a default_*_id within the context,
the many2one value name wasn't translated.

e.g. with Spanish loaded (and l10n_multilang installed),
translate a project.project name in Spanish.
Then, while being in Spanish, in the project.project kanban,
click on the Tasks link of a project (tareas),
then, notice the value of the project name in the
search bar.

opw-632818
2015-04-22 17:53:35 +02:00
Damien Bouvy 0d591ca6df [FIX] website_quote: accept button wasn't shown if no expiration date was set on the sale order 2015-04-22 16:47:47 +02:00
Damien Bouvy 88260a3f2c [FIX] analytic_contract_hr_expense: incorrect function signature no longer perturbates API wrappers (on_change returned result in list when expecting a dict when called from new api) 2015-04-22 16:47:47 +02:00
Damien Bouvy 128c2c92fc [FIX] sale_analytic_plans: remove faulty view 2015-04-22 16:47:47 +02:00
Damien Bouvy e4d8246c81 [FIX] website_sale: fix unnecessary permanent update of pricelist on checkout 2015-04-22 16:47:47 +02:00
Martin Trigaux d84b5d35ac [FIX] product: pricelist on product to apply on template
If a product as only one variant, using the product.product or the
product.template in the pricelist configuration should have the same effect.
This is particulary important for the ecommerce where template without variants
do not show the product. Having a pricelist for that product had no effect on
the price used in the e-commerce.

Fixes #2900, opw 615153
2015-04-22 16:27:05 +02:00
dhr-odoo cb5f00f580 [FIX] orm: ordering on >1000 records
When reading over IN_MAX (currently 1000) records, the select is slip into
subsets of IN_MAX records. However the list of ids was split using set() method
which removes order that may have been pass. The subsets are ordered using
_order attribute but the subsets were not ordered between themself.
This is an issue in case of browsing a o2m field with more than 1000 lines as it
will return sorted blocked but the order of the blocks is the order of the
contained ids (e.g. split(2, [5, 4, 3, 2, 1]) -> [[2,1], [4,3], [5]]).

Removes the set() to make sure the order of the given ids is preserved.
opw 616070, linked to #439
2015-04-22 12:14:33 +02:00
Xavier Morel bbe1845727 [FIX] doc: extra underline for document titles when document has no introductory blurb 2015-04-22 11:50:47 +02:00
Nicolas Lempereur 2b90e054bb [FIX] web: keep domain with search field
Currently (since commit e6a2d222d6), the domain of a search view field tag
is dropped.

This previous change was done since some of these domains refers to a
field not available in the javascript.

This fix drop the domain only if it can't be evaluated in the javascript
side.

opw-632030
2015-04-22 10:58:19 +02:00
Rifakat Haradwala ecdaf89469 [FIX] membership: shown customer invoice form instead of supplier
When somebody buys a membership, he is a customer, opw 615986
2015-04-22 09:10:28 +02:00
Denis Ledoux 64fd1dc636 [FIX] netsvc: logs to syslog
When starting the Odoo server with the parameters --syslog,
the logs are supposed to be pushed in the syslog.

This was no longer the case since e9d047e611.
Indeed, if no address is specified ('localhost', 514) is used,
which not always work. We therefore have no choice to define an address
which is '/var/run/log' for MacOSx,
and '/dev/log' for any other linux system.

opw-633074
2015-04-21 18:10:48 +02:00
Ajay javiya 8a6e859c2b [ADD] New payment acquirer Authorize.net. 2015-04-21 17:15:05 +02:00
Ravi Gohil 40982f5ace [FIX] website: Published/Not Published button now dynamically updates
Prior to this fix, when you clicked on Publish or Not Published, the
effect was immediate, but the button disappeared instead of just
updating itself to the new value.

Fixes opw 614561.
2015-04-21 15:34:35 +02:00
David Monjoie 8f90636686 [IMP] crm: Opportunities Analysis menu visible to Sale Manager
Before this commit, it was only visible by the admin user.

I used the crm.phonecall.report rules as an example, but I don't
think either of those or the opportunities ones are actually
used in the case of group_sale_salesman, because the submenu
Sales of the Reporting menu is only visible to the Sale Manager.

Fixes opw 615048.
2015-04-21 15:26:57 +02:00
Nicolas Lempereur 86116fd082 [FIX] sale: set company sales team for quotation
If there is not a dedicated salesteam for the current user, this fix sets the
sales team to the one dedicated to a customer if there is one.

opw-633134
2015-04-21 15:06:03 +02:00
Goffin Simon 6f679678f6 [FIX] account: duplicate tax
the duplication of a tax must duplicate the child_ids.

opw:630510
2015-04-21 10:09:56 +02:00
Vincent Vinet 3cc3ab6252 [FIX] document: polynomial time reordering of document ids
Triggered every time on list views as the list view uses a
search_count (filtered but unlimited) to display pagination.

closes #6397
2015-04-21 09:49:47 +02:00
David Monjoie f4e1974d67 [FIX] web_calendar: fixed counting of days when selection spans multiple weeks
As event_obj._length doesn't return the number of days when the selection spans
multiple weeks, the test was wrong when the selection ended on the first day of
a subsequent week.

This fix was originaly written by rha-odoo at 95d344b, but I rewrote it a little.
I would have liked a cleaner way of finding how many days there were between the
two dates, but I couldn't find anything better, considering I didn't want to
create new objects just for that test.
Fixes opw 614703.
2015-04-21 09:37:50 +02:00
Goffin Simon 7b923b57ba [FIX] sale_stock: supplier invoice
During the creation of an invoice, the partner returned by "_get_master_data" depends on inv_type.
inv_type = "out_invoice" is for customer invoice
inv_type = "in_invoice" is for supplier invoice

opw:632392, 632583
2015-04-21 08:47:06 +02:00
Martin Trigaux 0b2bc27adc [FIX] stock: use unit of measure for manual receptions
When using the manual reception wizard, if a quantity in a different unit of
measure was set, the unit was ignored. opw 617336
2015-04-20 17:16:22 +02:00
Luc De Meyer f8a2a64ade [FIX] web: onchange on field binary
If a onchange is set on a binary field, the name of the file (filename attribute
defined in the view) is still the name of the previous file.
Fixes #2427, opw 617109
2015-04-20 16:42:15 +02:00
Martin Trigaux 6262e3479b [FIX] web: onchange on field binary
When setting a value to a field binary, a char field can be set as 'filename'
that needs to be recomputed to specify the new file name.
Before new api, the _internal_set_value method would trigger a onchange but it's
no longer the case now (so onchange on filename field was no longer executed).
Instead, manually set the value using set_value method which do trigger the
onchange.
Fixes #2427, opw 617109
2015-04-20 16:33:55 +02:00
Goffin Simon 1aed46d2a8 [FIX] mail: Work order translation
The action_confirm function losses the context when called by a workflow.
To have the right translation, the lang of the user must be written in the context.

opw:632873
2015-04-20 15:56:48 +02:00
Goffin Simon 0422df2ad7 [FIX] account: general ledger report
The "Progress" column must be renamed in "Balance".

opw:633076
2015-04-20 15:53:38 +02:00
dhr-odoo 056ab55b6b [FIX] Passed bank statement's currency in payment_rate_currency_id of the account.voucher when importing payment lines 2015-04-20 14:28:07 +02:00
Denis Ledoux 3e29e72f37 [FIX] web: priority stars on/off design in modals
When opening a task through a modal, like
when opening the task field of an issue while
being in edit mode, the priority stars
had not the same design than in the
regular task form.

opw-633426
2015-04-20 13:24:55 +02:00
David Monjoie 9fdf06a0f6 [FIX] website_sale: fixed display of variant informations in cart
Prior to this, even if your suggested or optional products were variants,
only the name of the template was shown.
Fixed GitHub issue 2746 and opw 614776
2015-04-20 12:31:52 +02:00
Christophe Simonis 44059bce4b [MERGE] forward port of branch saas-3 up to 9323f2b 2015-04-20 12:11:15 +02:00
Christophe Simonis 9323f2b4c7 [MERGE] forward port of branch 7.0 up to a091de8 2015-04-20 12:10:48 +02:00
Christophe Simonis a091de8d8d [FIX] core: no traceback when closing socket.
Closes 5057
2015-04-20 11:54:58 +02:00
Christophe Simonis 13fec4a21c [FIX] core: avoid infinite recursive loop.
`function` fields are fully copied via `copy.copy()`.
`copy.copy()` *do not* call `__init__` after object creation; then
restore the state via `__setstate__()` or by updating `__dict__` or via
`setattr()` when the object uses `__slots__`.

As `__init__` is not called, the newly created object does not have any
`_args` attribute. This lead to a recursive call of `__getattr__ when
`copy.copy` check the existance of `__setstate__` attribute.

When break this loop by forbidding explicitly by checking the attribute
name accessed (We cannot check the presence of `_args` in `__dict__`
because we uses `__slots__`).

See http://bugs.python.org/issue5370
Fixes #6037
opw:633109
2015-04-20 11:00:09 +02:00
david.beal@akretion.com ea4f9c4625 [FIX] call fields_view_get with named context
otherwise new API bridging breaks down

closes #6371
2015-04-20 09:39:40 +02:00
Goffin Simon fc132665d7 [FIX] point of sale: Rounding method
By default, the point of sale awlways uses the rounding method per line.
But the accounting configuration allows to use the globally rounding method,
this is why the point of sale must consider this configuration.
Inspired from the compute_all of account.tax model within
addons/account/account.py.

opw:632537
2015-04-20 08:41:41 +02:00