Commit Graph
117975 Commits
Author SHA1 Message Date
jao-odoo 84a75ef851 Saas 11.2 account fix analytic accounting jao (#23110)
[IMP] purchase_requisition : add analytic_tag_ids field in purchase requistion

[IMP] sale: set analytic tags on invoice based on the analytic tags defined on SO

[IMP] account_analytic_default: add default analytic tags to invoice lines created from SO for down payment


(#23110)
2018-03-05 14:30:11 +01:00
Adrien Dieudonne 599f6a762e [FIX] web: qweb: load template with non-http xhr
Since we are able to lazy load Qweb templates, there was
an issue to generate Awesome Timesheet iOS native app with
Cordova properly. It seems that under Cordova, iOS always
returns 0 for the status on a xml http request object.

The problem is that native applications are requesting
a local file from something that isn't a webserver.

The local file is delivered with no http headers that means no
"200 OK" header and no "404 Not Found" errors.

In this case, the request is still be completing as intended even
if the status code used by browsers is 0.

For more info, see:
https://developer.mozilla.org/fr/docs/Web/API/XMLHttpRequest
https://bugzilla.mozilla.org/show_bug.cgi?id=331610
2018-03-05 14:06:23 +01:00
Mehul Patel a27488fa23 [FIX] l10n_generic_coa : define journal_id in the demo data creating vendor bills
The default function commputing the journal_id on invoices uses the context to get the type of the invoice and choose the journal. In regular cases, it works fine, but not with demo data. Hence, we need to explicitly set the journal on them.
2018-03-05 13:20:30 +01:00
Aaron Bohy 24904d406c [FIX] web: Calendar: control panel buttons in mobile
In mobile, we want a special 'Today' button to be displayed on the
bottom right corner of the control panel. Rev. ebe58d92 enforces
this by defining less layout rules on the control panel. However,
those rules apply globally, for all control panels, not only in
Calendar views. So it produces undesired behaviors in other views.

This rev. removes the undesired less rules, and instead appends
the 'Today' button in the pager area, which is in the bottom right
corner.
2018-03-05 13:15:08 +01:00
Nicolas Lempereur a86200597f [FIX] website_sale: update when changing quantity
There is several issue happening when changing quantity:

1) if website_sale_stock is installed, the displayed price is not
   updated when changing quantities.

2) if the "Add to Cart" price is not updated, it erroneously displays
   the price multiplied by the quantity.

3) when prices are updated, it only update attribute_value_ids.

4) when variant are displayed as list view, visually the last list item
   is selected instead of the first, also changing quantity doesn't
   update price as it should be given pricelist.

The first issue is caused by invalid JSON in data-attribute_value_ids
attribute. The code modify the `.data('attribute_value_ids')` thinking
it will be permanent. But if the value was invalid JSON we always parse
it on the fly inside a temporary object so the object is never changed.

The second issue is because originally, the "data-attribute_value_ids"
inside "Add to Cart" was set wrongly (when rendering the view) because
get_attribute_value_ids got the website_price multiplied by quantity.

The third issue was even with website_sale_stock is not installed
`.data('attribute_value_ids')` was only updated for one of the possible
multiple ones in the page.

With this change, we had json.dumps to ensure data-attribute_value_ids
is good JSON, and we correct errors so it is fixed for instance only
updating sources without updating website_sale and website_sale_options
modules.

note: when views are updated, this also solves a bigger issue when
python2 is used (because attribute_value_ids contained u'text' strings.

master equivalent of #23392 without js crutches for xml not updated

opw-1816479
closes #23467
2018-03-05 13:10:11 +01:00
Nicolas Lempereur 1d6e4a6e6b [FIX] website_sale: update when changing quantity
There is several issue happening when changing quantity:

1) if website_sale_stock is installed, the displayed price is not
   updated when changing quantities.

2) if the "Add to Cart" price is not updated, it erroneously displays
   the price multiplied by the quantity.

3) when prices are updated, it only update attribute_value_ids.

4) when variant are displayed as list view, visually the last list item
   is selected instead of the first, also changing quantity doesn't
   update price as it should be given pricelist.

The first issue is caused by invalid JSON in data-attribute_value_ids
attribute. The code modify the `.data('attribute_value_ids')` thinking
it will be permanent. But if the value was invalid JSON we always parse
it on the fly inside a temporary object so the object is never changed.

The second issue is because originally, the "data-attribute_value_ids"
inside "Add to Cart" was set wrongly (when rendering the view) because
get_attribute_value_ids got the website_price multiplied by quantity.

The third issue was even with website_sale_stock is not installed
`.data('attribute_value_ids')` was only updated for one of the possible
multiple ones in the page.

With this change, we had json.dumps to ensure data-attribute_value_ids
is good JSON, and we correct errors so it is fixed for instance only
updating sources without updating website_sale and website_sale_options
modules.

note: when views are updated, this also solves a bigger issue when
python2 is used (because attribute_value_ids contained u'text' strings.

another version will be merged in master with #23467

opw-1816479
closes #23392
2018-03-05 13:02:29 +01:00
len-odoo e710e5df7a [FIX] web: show error when trying to export a report with more than 256 columns
If the user tried to generate a report with more than 256 columns,
he would get a traceback instead of an error message.
Furthermore, if only one measure was selected, then the check was not done
and the user would also get a traceback.

opw-1816931
2018-03-05 12:56:27 +01:00
Mehul Patel 3807e71801 [FIX] l10n_generic_coa : define journal_id in the demo data creating vendor bills
The default function commputing the journal_id on invoices uses the context to get the type of the invoice and choose the journal. In regular cases, it works fine, but not with demo data. Hence, we need to explicitly set the journal on them.
2018-03-05 12:54:42 +01:00
Christophe Simonis 7c708bc004 [MERGE] forward port branch saas-14 up to df3c33111e 2018-03-05 12:50:58 +01:00
Hiral Bhavsar b9389cc944 [IMP] website_sale: no "zoom" pointer on products in edit mode 2018-03-05 12:16:43 +01:00
Hiral Bhavsar f7fd155618 [IMP] web: improve "missing image" icon
The goal is to better see the image can be edited and to have a bigger
image to use in website pages (like a product page).
2018-03-05 12:15:06 +01:00
Hiral Bhavsar 79c9b44fdc [IMP] website: change design of "drag-here" area
Use CSS style with a translated text instead of an image.
2018-03-05 12:14:06 +01:00
Julien Legros d8014a5a1e [IMP] project: add 3 indexes to project_task
This commit adds 3 indexes targeting project_task which are not only
useful in regular RW use cases, but help tremendously when deleting
tasks.

In a production scenario, deleting a single task record went from 685ms
to 5ms.

Equivalent queries for an existing database:

CREATE INDEX account_analytic_line_task_id_index ON account_analytic_line(task_id);
CREATE INDEX project_task_parent_id_index ON project_task(parent_id);
CREATE INDEX sale_order_line_task_id_index ON sale_order_line(task_id);
2018-03-05 12:12:56 +01:00
Nicolas Martinelli f7307d64b8 [FIX] mail: activities of archived records
- Create an activity for a crm lead
- Set the lead as lost

The activity still appears in the list.

A proper fix would be to have an `active` field on `mail.activity`. In
the meantime, simply delete activites when archiving.

opw-1817703
2018-03-05 11:49:42 +01:00
Raphael Collet b53c017052 [FIX] fields: use copy_cache during onchanges only
This fixes the bug introduced in rev 34c52e9938
that optimizes method `copy_cache`.
2018-03-05 11:25:37 +01:00
sum1201 d67d0caee2 [FIX] web: translate 'External ID' string
Closes #22763
2018-03-05 11:05:00 +01:00
Christophe Simonis df3c33111e [MERGE] forward port branch 10.0 up to 554afff3ac 2018-03-05 10:45:53 +01:00
Christophe Simonis 554afff3ac [MERGE] forward port branch 9.0 up to b8824913a7 2018-03-05 10:38:02 +01:00
Vincent Schippefilt 02eef78bbd [FIX] web : remove useless reload of failed _callButtonAction
Before this fix, when a _callButtonAction failed, it would reload the model.
After this fix we will not reload if a _callButtonAction fails
2018-03-05 09:33:39 +01:00
Swapnesh Shah 1697ccc183 [FIX] sale: Re-init account.invoice.report view only if it exists
Uninstalling account gets rid of this view and since sale depends on account, it is uninstalled as well, which triggers the uninstall_hook.

Closes #23446
2018-03-05 09:15:53 +01:00
Lucas Perais (lpe) 698dffcef0 [FIX] website_sale: avoid duplicated Thanks message
Configure a thanks message on a payment acquirer which has no automatic confirmation (none value)
(The wire Transfer will do)

Make a website sale with that acquirer

When arriving on the confirmation page on the website:

Before this commit:
The thanks message was duplicated: one at the top, just under "transaction is waiting a manual confirmation"
and one at the bottom, where the actual transaction status is displayed

After this commit:
The thanks message just appears at the bottom location

OPW 1787799
2018-03-05 09:06:56 +01:00
Nicolas Martinelli 4badf49ad0 [FIX] pad, pad_project, note_pad: duplicate object
The duplication of a task crashes at the following:
`content = myPad.getHtml(path).get('html', '')`

The copy mechanism is quite cumbersome:
- In `copy` method, generate an URL of a pad which doesn't exist since
  `object_id` is still undefined.
- The `create` method somehow attempts to fill in the previously created
  pad thanks to `_set_pad_value`.

The logic is made simpler. The pad URL field is set as `copy=False`,
therefore the create mechanism will take care of handling the pad
creation and its synchronization.

opw-1818757
2018-03-05 08:42:11 +01:00
Odoo Translation Bot 566ce21d42 [I18N] Update translation terms from Transifex 2018-03-04 04:19:33 +01:00
Odoo Translation Bot 3527bc004c [I18N] Update translation terms from Transifex 2018-03-04 00:58:51 +01:00
Fabien Pinckaers 7102362803 [IMP] sale: copywriting - not only the customer can confirm quote 2018-03-02 20:44:06 +01:00
Olivier Dony 7836b8811b [FIX] sale*: properly mark method as @classmethod
When inheriting a @classmethod, the override needs to have the
@classmethod decorator as well, otherwise calls will fail with a
TypeError
2018-03-02 18:27:18 +01:00
Olivier Dony 71ccea35ba [FIX] payment: employees should not edit acquirers 2018-03-02 18:27:18 +01:00
qsm-odoo 80f97fbd19 [FIX] website_slides: load viewer for app's iframes only
The website_slides JS was working on all iframe in all pages while it
should only affect its own ones, which contains a PDF document.
2018-03-02 18:13:22 +01:00
Jeremy Kersten 68e9d5504c [IMP] website: make website.redirect fields required
Before this commit, it was possible to create redirect with empty values.
Now, for new db, that will be required.

Fix usability according to first feedback
   - Redirect / menu should be visible without debug mode
     because user need it when they start their website and
     dont know at the beginning how to enable it (fgi)
   - fa icon in page manager was for blind people
   - missing widget on sequence field
2018-03-02 18:03:01 +01:00
Martin Trigaux 3a0ab670d1 [FIX] sms: bad target
Introduced in previous commit ec00970f
2018-03-02 17:33:25 +01:00
dduarte 99a3ba631e [CLA] PromptEquation / OdooGap signs CCLA
Closes #19223
2018-03-02 17:02:54 +01:00
Denis Zaripov 9d14229767 [CLA] D2C signs Odoo CCLA
Closes #22959
2018-03-02 16:55:44 +01:00
Swapnesh Shah ec00970f12 [IMP] sms: open link in a new window
Instead of current one

Closes #23097
2018-03-02 16:46:16 +01:00
invitu 7d1775fda3 [IMP] product: use montenary label
Format the product price on the product label report to format correctly
the currency

Closes #22999
2018-03-02 16:43:00 +01:00
Hilar Ak 9e36f966f1 [FIX] hr_recruitement: remove duplicated view mode
Closes #23129
2018-03-02 16:29:07 +01:00
Hilar Ak ff9801dc69 [CLA] hilarak signs the CLA
Done at #23129
2018-03-02 16:29:07 +01:00
Martin Trigaux 796cc8a6bf [I18N] generate saas-15 translations
based on 11.0 translations
2018-03-02 16:24:13 +01:00
Ankit Sathvara 6be9fa3967 [IMP] web,hr: Phone widget is always clickable
With this commit, when a phone number is clicked (in readonly),
 - if voip is not installed, it opens an app according to the user
   choice (e.g. skype), and on mobile, it opens the phone app to
   call the number
 - if voip is installed, in desktop, it opens voip, and on mobile,
   it still opens the phone app to call the number, because webRTC
   is not supported.

This commit also makes the employee form view use the phone widget
for the 'Work Phone' and 'Work Mobile' fields.

Task #30369
2018-03-02 15:45:42 +01:00
Géry Debongnie 0ecfd7bf3e [FIX] sale_timesheet: fix a typo
Someone insisted for a refactoring to land in master.  Because of his
stubborness, a mistake was introduced...  Thank you, mister someone... I
hope that you're happy...
2018-03-02 15:00:21 +01:00
qdp-odoo b8824913a7 [FIX] account: fix _amount_residual() dependencies.
The computation of residual amounts on account.move.line does not use account_id.currency_id... and should not. Never.
The previous implementation was thus stupidly recomputing the amount_residual fields on all journal entries of an account as soon as its currency field was touched, for nothing.
2018-03-02 14:45:15 +01:00
Fabien Pinckaers 09a22e3bef [IMP] base: select countries & state based on exact code, (useful for import and fast many2one) 2018-03-02 14:21:36 +01:00
tbe-odoo 4d905070f9 [FIX] payment: Unable to pay if character '/' in reference
- On 'website_payment/pay' if the reference contains a '/' the payment will never succeed.
  It is due to the fact that in the template "payment.pay" were setting "prepare_tx_url" and "form_action" using this reference.
  But having a '/' in the reference breaks the URL to call to create a transaction.
  So when creating a transaction (or even paying in S2S) the payment never succeed and returns a HTTP 404 error.
2018-03-02 14:18:47 +01:00
Géry Debongnie e0e3deac41 [REF] sale_timesheet: adapt to new guidelines 2018-03-02 13:30:37 +01:00
Géry Debongnie be3c89d701 [FIX] sale_timesheet: fix crash in project plan
The Project Plan code is quite new, but does some unconventional stuff.
It looks like a form view, but it is actually a client action with a
custom search view.  The problem fixed by this commit is that when we
try to open the project plan from the project kanban view, it crashes.

It was caused by a bad interaction between the dashboard search view and
the action manager.  The dashboard search view trigger a search event,
which bubbles up to the action manager.  Since the project plan is not
loaded yet, the action manager assumed that the search event was for the
kanban view instead of the project plan.

The fix is to prevent the event from bubbling up, since the project
plan already handles the search event anyway.

Note that we also set the title in this commit to a default value, to
make sure that if we reload the client action, its title is set to a
more interesting value than 'Undefined'.

We also added a few tests, which could have prevented this mess.  Now it
should be easy to add more tests whenever needed.
2018-03-02 13:30:36 +01:00
tbe-odoo aded844129 [FIX] mail: Check if attachment has mimetype
- Check if the attachment has a mimetype before trying to split its value.
2018-03-02 13:16:26 +01:00
Josse Colpaert 3bd2bb7aa1 [FIX] stock: avoid block of schedulers
Avoid block of schedulers when there are confirmed moves of 0 quantity.

Co-authored-by: Nicolas Martinelli <nim@odoo.com>
opw-1817784
2018-03-02 13:07:21 +01:00
Géry Debongnie fc9855d419 [FIX] sale_timesheet: fix crash in project plan
The Project Plan code is quite new, but does some unconventional stuff.
It looks like a form view, but it is actually a client action with a
custom search view.  The problem fixed by this commit is that when we
try to open the project plan from the project kanban view, it crashes.

It was caused by a bad interaction between the dashboard search view and
the action manager.  The dashboard search view trigger a search event,
which bubbles up to the action manager.  Since the project plan is not
loaded yet, the action manager assumed that the search event was for the
kanban view instead of the project plan.

The fix is to prevent the event from bubbling up, since the project
plan already handles the search event anyway.

Note that we also set the title in this commit to a default value, to
make sure that if we reload the client action, its title is set to a
more interesting value than 'Undefined'.

We also added a few tests, which could have prevented this mess.  Now it
should be easy to add more tests whenever needed.
2018-03-02 12:58:58 +01:00
Laurent Smet 515160978a [FIX] point_of_sale: don't create invoice with negative amount
When creating an invoice from POS order having a negative amount (due to return products), a credit note must be
generated instead of a customer invoice.

-github issue 23167
2018-03-02 11:57:41 +01:00
Jeremy Kersten 5ad278ac08 [FIX] web_editor: show 'open in new window' on link edit
Before this commit, when a user open an existing link in the editor
he cannot check/uncheck the option "Open in new Window" while he don't
update the url.

The field was hidden while keyup was not called.

After this commit, if the url contains a url, we show directly the checkbox.

This commit fixes opw-1819601
2018-03-02 11:56:07 +01:00
Arnold Moyaux 29f1239d1a [FIX] stock: merge move with a mix RFQ/PO
Use case to reproduce:
- Create a Product MTO that should be buy
- Create a SO with this product and confirm it
- Confirm the RFQ
- Increase the ordered quantity on the SO
- Confirm the new RFQ
- Receive product from the 2 PO
-> Unable to reserve the quantity on the destination moves

It happens because the link between the reception move from the second PO and the delivery move is missing.
Update the quantity on the SO will create a new move with the missing quantity that will generate the new RFQ
then this move is merged in the main move. However the reception move is only created when the RFQ is confirm
and the move_dest_ids is stored on the purchase order line during this time.
Thus merge moves will unlink the new move with its reference on the purchase order line and the link is lost.

This commit do not merge move that have different RFQ/PO in order to avoid losing MTO information.
2018-03-02 11:29:13 +01:00