Commit Graph
118156 Commits
Author SHA1 Message Date
Arnold Moyaux 86cb5203a1 [FIX] delivery: traceback on single tracker
When using easypost, it could exist more than one tracking
link. In this case they are stored as a json and the method
open_url try to load it as a list of url. Then it checks if there is
more than one url or not. However in a single case, there is only one
string and the lenght of a string is the number of chracter inside that
is often more than one.
2018-06-26 13:16:27 +02:00
XavierDo 3ea85a603e [FIX] mail: fix forwardport mistake
A part of the code was unreachable after merging forwardport.

Closes #25477
2018-06-26 11:58:59 +02:00
jem-odoo 884fe14235 [FIX] sale_timesheet: prevent CRUD from plan project for SO/INV
When coming from the project overview throught the sale orders, or
invoices stat buttons, creating the object will not linked it to
the project. This might confuse the users. The CRUD operation should
be prevent from there, as this is reporting.
2018-06-25 14:29:26 +02:00
jem-odoo efce9e4a14 [FIX] sale_timesheet: create SO from project label and domain
We want to allow use to set any services when making
a project billable. This commit also changes the
label for a better understanding.
2018-06-25 14:29:26 +02:00
jem-odoo ac294b25af [FIX] sale_timesheet: expense reinvoiced at cost in plan project
When reinvoice an expensable product at cost, it should
takes the amount on the analytic lines created when posting
expenses, instead of the cost on the product.
For instance, you create an expense with the generic expense
product (for a lunch, for instance). The cost of the generic
product is zero, but you don't want to see that amount in
your project plan, and we don't want to create a product
per "lunch expense".
2018-06-25 14:29:26 +02:00
Olivier Dony 6c9176652f [IMP] res.partner: improve error message when changing company 2018-06-25 09:59:00 +02:00
Olivier Dony bf9a4663ff [IMP] mail: improve UI text in mail resend wizard 2018-06-23 03:12:05 +02:00
Olivier Dony cab349e7e4 [FIX] mail: access related fields for resend as normal user 2018-06-23 03:12:05 +02:00
Olivier Dony c77d3e5531 [FIX] mail: line endings: DOS->UNIX 2018-06-23 03:12:04 +02:00
qsm-odoo a17cd93864 [FIX] web_editor: allow recropping a newly cropped image
Since https://github.com/odoo/odoo/commit/a473453b3166a381130d9bd6ec4851b9e1ecab26,
a newly cropped image gets a base64 src until the user choose to save
the page (where we create an attachment for the cropped picture). The
problem is that when reentering the crop edition at once... it was not
able to be performed because we did not handle base64 images there.

This commit solves this and accidentally adds a feature: allow cropping
base64 images.
2018-06-22 17:09:54 +02:00
qsm-odoo 6209b12937 [FIX] web_editor: do 'reset' crop feature when changing ratio
This reverts commit bf64efb5a0.

Indeed, it was in fact necessary as more complex bugs of the library
can appear if we do not reset before. They even do that themself in
their library demo: https://fengyuanchen.github.io/cropperjs/
2018-06-22 17:09:54 +02:00
Priyanka Kakadiya 27bbcb45ad [FIX] account: fix traceback in payment matching
when writeoff is involved, there was a traceback
2018-06-22 14:22:33 +02:00
Aaron Bohy fdf615a551 [FIX] web: onchange in non inline one2many list
Let's assume a one2many list with two fields A and B, and an
onchange on A that sets B. Before this rev., on new records, the
onchange was only triggered if the one2many list was defined
inline.

Rev. 13c885195 was an attempt to fix the onchange issue in x2manys
with non inline views, but it only worked on existing records. This
rev. fixes the problem for both cases (existing and new records),
and thus reverts the fix of 13c885195.

The idea of this fix is to make both cases behave similarly, w.r.t.
fields and viewFields stuff in the fieldsView. In the inline case
(like in the main view case), fields and viewFields are the same.
In the non inline case, viewFields contained more information than
fields. As fields is used everywhere in BasicModel (and viewFields
is basically ignored), the fix is to set fields to viewFields.
2018-06-21 13:57:58 +02:00
Aaron Bohy 239d460ae5 [FIX] bus: correctly forwardport 10161f9d61 2018-06-21 13:57:57 +02:00
qsm-odoo a473453b31 [FIX] web_editor: review crop attachment creation/discard
Previous implementation was wrong as it did not care about the ability
to discard a crop edition. Indeed, whenever a crop dialog was saved,
a crop attachment was created or updated at once. Discarding the editor
would then either:

- Seem to discard a first-time cropped image but would have created an
  attachment for nothing (just the image src was reset)

OR

- Fail to discard a second-time cropped image as the cropped attachment
  would have been directly updated and the image src would not have
  changed

This commit changes the way it works:

- On crop dialog save, the image is marked with required data for a
  potential future save of the cropped image (as a DB attachment) and
  the src is set to the base64 cropped image directly.

Note that the code ends up being clearer and efficient that way too.
2018-06-21 12:59:16 +02:00
qsm-odoo cd812bd6f4 [FIX] web_editor: fix saving and restoring of crop aspect ratio
When an image was cropped and saved with a specific aspect ratio,
it was not restored properly on further crop editions.
2018-06-21 12:58:33 +02:00
qsm-odoo a9366de8f9 [FIX] web_editor: do not show cropped images in media dialog
Cropped image attachment were not meant to appear in the media dialog,
only original ones.
2018-06-21 12:58:03 +02:00
qsm-odoo bf64efb5a0 [FIX] web_editor: do not 'reset' crop feature when changing ratio
Before this commit, when the user changed the ratio option in the crop
dialog, the image zoom/rotation were reset for no apparent reason.
2018-06-21 12:56:38 +02:00
qsm-odoo a04b79a205 [FIX] web_editor, *: properly remove DOM portions in a snippet
* website, website_mail_channel

Before this commit, when using the 'number of columns' option from a
column's snippet editor, the snippet overlay remained floating in the
void if the current column was removed by the option. This was because
the option did a simple "destroy" on the column without caring about
the snippet editors.

This commit introduces a new event which can be trigger_up'ed to ask
the editor to properly remove a DOM portion (destroy related editors,
call the 'onRemove' callbacks, ...).
2018-06-21 12:54:17 +02:00
qsm-odoo f6bbc40fbe [FIX] web_editor: reset snippet editors on snippet move
As indicated in a code comment, destroying and rebuilding all snippet
editors when a snippet is moved is more accurate as the snippet options
may depend on the new locations in a way the 'onMove' callback cannot
handle. That operation seemed however too costly for no visual benefit
at the time. Now, not implementing it is a source of bugs and redundant
code (as with the new "number of columns" option which is not properly
updated once a column is moved in another row), so this commit
implements the feature.

This also allows for some improvement: the 'cleanForSave' part of
snippet editors is always performed when they are destroyed.

If this proves to be ok and safe, we might want to backport this in
previous versions.
2018-06-21 12:54:17 +02:00
nla-odoo fd5062eb63 [FIX] payment_stripe: fix usage of removed 'refunding' state on payment.transaction
Since 0121634#diff-dc63c46ab28cd7b4ad9c17f2ccc3fbc7L491, the 'refunding' state no longer exists.
2018-06-21 12:13:40 +02:00
Laurent Smet 66f5367c39 [FIX] account: fix warning on domain
A warning occurs on runbot build since f9d00055da.
2018-06-21 10:21:26 +02:00
qdp-odoo 2bcff00065 [REF] account: dead code removal
since revision b30fed7a7b the model account.opening does not exist anymore, that function was deadcode leftover.
2018-06-20 16:42:00 +02:00
Simon Lejeune 5dc9230c6e [FIX] barcodes: barcode input
If the barcode input is hidden, it isn't possible to focus it and thus
it isn't possible to actually use it.

related to rev b4a8338959
2018-06-20 14:46:30 +02:00
Laurent Smet f9d00055da [FIX] l10n_es: fix chart_template installation
Since d5359cfcf4, it's no longer possible to install the
l10n_es chart templates. Indeed, the transfer account template is generated twice with
the same code due to the addition of a domain in the previous commit:

('chart_template_id', '=', self.id)

...that doesn't take care about the hierarchy of chart template (through the parent_id field).
2018-06-20 10:20:15 +02:00
Adrien Dieudonne fc5d030ef2 [FIX] web: checks rpc responses in web.ajax
Before this commit, load_action and load_views were never resolved
in case of internet connection loss.
It's because the call is triggered by web.rpc direcly who uses
ajax.rpc without any response check.

Now the rpc response is checked in web.ajax.
Thereby all responses are handled whether they come from session.rpc
or rpc.query.
Plus, it was not the responsibility of the session to check the
rpc responses.

Steps to reproduce the issue:
(1) load_action:
- Go to the app switcher for the first time
- Force disconnected from the network
-> No notification appears and the user aren't notify
(2) load_views (mobile only):
- Go to Sales -> Quotation
(In this case, the first call is 'load_views' because we need to force
to load some views like kanban view)
- Force disconnected from the network
-> No notification appears and the user aren't notify

Note: It's now important to notify the user about connection loss
because a recent improvement in mobile app replaces the 'retry screen'
and lets the webclient handle connection issues by itself.
The single odoo mobile app is supposed to work with all databases
from 10.0.
2018-06-19 20:11:22 +02:00
Raphael Collet d3e2cf5585 [FIX] resource: methods plan_* can return naive datetimes
Make those methods return a datetime in the same (naive or aware) timezone as
their argument.
2018-06-19 16:44:56 +02:00
Olivier Colson 85156a8e32 [IMP] account: new bank account setup wizard: remove label on journal name field, for better usability 2018-06-19 10:45:50 +02:00
Kishan Gajjar 47b5c00181 [FIX] web_editor: properly compute scss files
In LESS, 'fadeOut' function is used to make a color more transparent.
In SCSS, that function is called 'fade-out'.

Closes https://github.com/odoo/odoo/pull/25233
2018-06-18 12:09:49 +02:00
Christophe Simonis a935d5bc83 [FIX] base: fail during previous foward-port 2018-06-15 15:11:06 +02:00
Christophe Simonis 73652a0b19 [MERGE] forward port branch saas-11.3 up to 50860317cc
Note: 1aacc96262 has been ignored and will
be forward-ported later
2018-06-15 13:27:27 +02:00
Christophe Simonis 50860317cc [MERGE] forward port branch saas-11.2 up to b170a753e1 2018-06-15 11:30:27 +02:00
Christophe Simonis b170a753e1 [MERGE] forward port branch 11.0 up to b05e4d5f95 2018-06-15 10:15:27 +02:00
jem-odoo 8a03563269 [FIX] sale_timesheet: remove useless field in sql view 2018-06-15 09:43:52 +02:00
Christophe Simonis b05e4d5f95 [MERGE] forward port branch saas-15 up to a53bea49fe 2018-06-14 21:28:39 +02:00
Christophe Simonis a53bea49fe [MERGE] forward port branch saas-14 up to 7c8f335988 2018-06-14 19:19:14 +02:00
Christophe Simonis 7c8f335988 [FIX] sale: do not load non-existing file
Revert fd2b130428
2018-06-14 18:29:59 +02:00
Nicolas Martinelli 5ac40752a4 [FIX] mrp: register time on WO
When manually registering a time on a Work Order, an error is raised
because of an incorrect value for `workcenter_id`.

The field is added in the view.

opw-1851766
2018-06-14 18:20:52 +02:00
Nicolas Martinelli 7aef847585 [FIX] event: event stat button
Display stat button to groups who have read access to events.
2018-06-14 18:17:00 +02:00
Toufik Benjaa a3c9c286cc [FIX] payment_stripe: Make stripe.js code more generic
- Stripe.js was limited to only a few pages, which means, if you tried to
implement a new payment route it would never work without modifying
stripe.js to support the new case.

  This commit allows stripe.js to be generic and work with any page.
2018-06-14 18:06:38 +02:00
Christophe Simonis 803df909b1 [MERGE] forward port branch saas-14 up to 804d68efe5 2018-06-14 18:05:38 +02:00
Christophe Simonis 804d68efe5 [MERGE] forward port branch 10.0 up to 23a1bce2a9 2018-06-14 18:03:26 +02:00
Christophe Simonis 23a1bce2a9 [MERGE] forward port branch 9.0 up to 90165e2d96 2018-06-14 17:29:56 +02:00
Christophe Simonis 90165e2d96 [FIX] WorkerCron: keep registry alive after job processing 2018-06-14 17:17:13 +02:00
Christophe Simonis 5233dbdb54 [FIX] core: do not clear cache when removing registry from pool
No need to force other workers to reset their cache.
2018-06-14 17:17:13 +02:00
RomainLibert dff3cd6319 [FIX] hr_holidays: avoid execution of onchange when no employee linked
If the current user is not linked to any employee we cannot retrieve his
calendar and so we cannot compute default times for the leave.
2018-06-14 16:38:18 +02:00
Prakash Prajapati 42ba1298d8 [FIX] website_sale: fix form view not opened for unpaid orders and abandoned carts
Closes #PR:24940. Related to task/issue ID 1851353.
2018-06-14 16:18:55 +02:00
Priyanka Kakadiya a4290faebf [FIX] hr_holidays: set fallback timezone when user has none
Field tz is not mandatory on res.partners, so we need a fallback in case
it is not defined.

Related to Issue : 1856843
Closes #25206
2018-06-14 16:12:53 +02:00
Adrien Dieudonne 1aacc96262 [FIX] web: checks rpc responses in web.ajax
Before this commit, load_action and load_views were never resolved
in case of internet connection loss.
It's because the call is triggered by web.rpc direcly who uses
ajax.rpc without any response check.

Now the rpc response is checked in web.ajax.
Thereby all responses are handled whether they come from session.rpc
or rpc.query.
Plus, it was not the responsibility of the session to check the
rpc responses.

Steps to reproduce the issue:
(1) load_action:
- Go to the app switcher for the first time
- Force disconnected from the network
-> No notification appears and the user aren't notify
(2) load_views (mobile only):
- Go to Sales -> Quotation
(In this case, the first call is 'load_views' because we need to force
to load some views like kanban view)
- Force disconnected from the network
-> No notification appears and the user aren't notify

Note: It's now important to notify the user about connection loss
because a recent improvement in mobile app replaces the 'retry screen'
and lets the webclient handle connection issues by itself.
The single odoo mobile app is supposed to work with all databases
from 10.0.
2018-06-14 15:57:55 +02:00
Christophe Simonis c13d67dd25 [FIX] website: valid time zone guessed from GeoIP
The timezone returned by GeoIP may be unknown by `pytz` due to
incompatibilities between GeoIP and pytz databases (which may be outdated).
2018-06-14 15:49:16 +02:00