Commit Graph
117156 Commits
Author SHA1 Message Date
Christophe Simonis 153ae5e8b8 [MERGE] forward port branch 10.0 up to a6855b31c9 2018-03-01 16:51:37 +01:00
Thibault Delavallée 5cd0dba0aa [FIX][IMP] project: set unusable group by as invisible
This commit is a better implementation 9b2450e8b6 for stable as it has less
impact on existing data.
2018-03-01 16:25:51 +01:00
Nicolas Martinelli 2d6c2a7dca [FIX] website_crm_partner_assign: modify lead
- As admin, create an opportunity
- Under the tab Assigned partner set the portal user
- As portal user go to My account > My opportunities > Edit opportunity
- Change something

Confirm button doesn't work. In fact, an access error is raised silently
in the JS console.

The issue is raised in `update_lead_portal`, at `lead.activity_ids...`.
This is because the field `activity_ids` has
`groups="base.group_user"`.

opw-1817935
opw-1818629
2018-03-01 16:18:57 +01:00
Géry Debongnie 132137939c [FIX] web: prevent footer from being rerendered
In some cases, the footer in a form view dialog could be duplicated.
The reason was that the form view was rerendered completely, footer
included, by the renderer, out of the formcontroller control (it is the
formcontroller's job to move the footer buttons to the footer).

A possible fix is to work on the form renderer to make it aware that the footer
buttons are expected to be only rendered once, but it has the disadvantage to
be a fix specific to this issue, and any other form view behaviour with some
side effects may have the same issue.

This commit tries to prevent the form view from rerendering itself
completely in those cases. This also has the disadvantage of possibly
not being a complete fix, if some edge cases are missed.  However, I
have the feeling that we still want to avoid rerendering the full view
if possible.
2018-03-01 16:08:22 +01:00
Aaron Bohy 3ad3e450e4 [FIX] web: Calendar: only highlight today
Before this rev., in week and month modes, when navigating through
weeks or months, the weekday/monthday of today was still
highlighted in other weeks and months than the current ones.

This rev. ensures to only highlight today in the main calendar
view (this doesn't impact the mini calendar).
2018-03-01 15:31:16 +01:00
Christophe Matthieu f4bca15520 [FIX] account: Reconciliation display correct display_name in many2one
Issue: When using many2one select dialog, the the field (eg. Account)
display the previous value.

opw-1819832
2018-03-01 13:45:19 +01:00
Christophe Matthieu ad57bfd2e8 [FIX] web: mock_server name_search use limit kwarg
We need support the limit arguments for name_search in unit tests.
2018-03-01 13:45:19 +01:00
Nicolas Martinelli 9dfe2ef391 [FIX] website_quote: view quote
- Create 2 SO for the same customer
- Send them
- As the customer, click on 'Accept and sign online' for both quotes.

The message 'Quotation viewed by customer' is only posted on the first
quote.

opw-1815082
2018-03-01 13:41:30 +01:00
Christophe Simonis a6855b31c9 [MERGE] forward port branch 9.0 up to d4ec6b75ac 2018-03-01 13:25:10 +01:00
Thibault Delavallée 9b2450e8b6 [FIX][IMP] project: remove message_last_post groupby in task
This filter groups tasks based on a message_last_post field that is not
updated anymore since quite a long time. It has been implemented for some
internal custom use and not supported since.

As this field has no use and lead to wrong result it has to be removed. Its
purpose can still be achieved in custom using server actions activating the
message_last_post context key and adding the field in custom views.

Done after feedback from internal migration.
2018-03-01 12:11:16 +01:00
Thibault Delavallée c574490a66 [FIX][IMP] project: include emails in customer portal
Customer portal has a widget to display a chatter-like communication
history. However only user comments are displayed. It seems interesting
for documents like tasks that also include tickets and support to
display incoming emails. Indeed most customers will use their email
to discuss with the responsible.

Done after feedback from internal migration.
2018-03-01 11:56:22 +01:00
Thibault Delavallée 66984ab90a [FIX][IMP] project: add task # in portal view
As tasks are now used for a lot of use cases including tickets and support
it seems fair to include the task ID as reference in the portal view
for customers. It eases the communication process as people can directly
give the reference (aka ID).

This commit therefore adds a column in portal list view with the task ID
as reference. It also adds it in the portal form view, just after the
task name.

Done after feedback from internal migration.
2018-03-01 11:56:14 +01:00
Swapnesh Shah 685f4eff50 [FIX] purchase: set date_approve on order confirmation
Restore behaviour before the workflow removal

Closes #23306
Fixes #23273
2018-03-01 11:55:42 +01:00
tbe-odoo d4ec6b75ac [FIX] yaml tests: Allow use of context inside context evaluation 2018-03-01 11:03:40 +01:00
len-odoo 3ca9661ab4 [FIX] event: move calendar block in the template
The `location` variable was used before it was set in the event reminder in
the email template.
Introduced at f8c6c76

When rendered, the links to add the event to a Google/Yahoo/Outlook calendar
were not set the event to the correct location

opw-1818699
2018-03-01 10:18:50 +01:00
Goffin Simon bb6039369c [FIX] delivery, website_sale_delivery: Delivery Methods and multicurrency
Steps to reproduce the bug:

- Set your company currency to USD
- Set multicurrency on your user
- Create a delivery method with a fixed price to 50$
- Create a SO with a pricelist in EUR
- Set the delivery method and check the price

Bug: It displayed 50€ while this amount should be converted

opw:1817666
2018-03-01 09:37:44 +01:00
Laurent Smet 0b0fdb9bd1 [REF] base: improve User error message when duplicating company 2018-03-01 09:13:37 +01:00
Odoo Translation Bot fd032df4d1 [I18N] Update translation terms from Transifex 2018-03-01 02:39:27 +01:00
Joren Van Onder 0060e86858 [FIX] pos_mercury: don't attempt negative transactions
Normally Vantiv should return an 'Invalid Purchase Amount' error. But
sometimes they will process the transaction anyway as if it had a
positive amount. We're sure the amount we send is negative. After
communicating with Vantiv it's unclear why that sometimes
happens. They recommend to explicitly prevent negative charges and to
not rely on them throwing an error.

Since we have to display an error message to the user anyway we take
the opportunity to explain the correct full flow to handle refunds.

opw-805302
2018-02-28 10:42:18 -08:00
Joren Van Onder 9049e53d21 [FIX] pos_mercury: don't 'Wait for swipe' for negative payments
We don't support refunds this way. Instead these should be handled
separately through the Vantiv backend.

opw-805302
2018-02-28 10:42:15 -08:00
Christophe Simonis 9d25cc3429 [FIX] *: correcly format amounts in mail templates 2018-02-28 19:01:35 +01:00
qsm-odoo 6693e3181a [FIX] doc: adapt theme tutorial with new page records
Before this commit, the theme tutorial was still creating pages using
`<template page="true"/>`. This was not just outdated, it was also
making the whole created theme fail to load.

Closes https://github.com/odoo/odoo/issues/21243
2018-02-28 18:14:47 +01:00
tbe-odoo 49255e7d76 [FIX] sale_timesheet: Multicompany invoices with timesheet
- Assuming a sale order invoiced in a different company.
  The sale order line's invoice_lines fields will be empty, which causes issues with sale_timesheet.
  The code assumes that if the sale order line invoice status is set to 'invoice', it has at least one invoice line, which is not true.
  This patch address a fix for this issue.
2018-02-28 17:19:22 +01:00
qsm-odoo b9d217c4f5 [FIX] website_form: button seemed buggy while it was actually disabled
Thank you to @Yajo
Closes https://github.com/odoo/odoo/pull/21628
2018-02-28 17:09:17 +01:00
Laurent Smet f4262e1a36 [IMP] sale: remove duplicate codes for price_total
The price_total field (computed) on the account.move.line model in the account module is overrid
in the sale module with a new compute method doing exactly the same thing. This override is
useless and leads to a duplicate field on the database making the ORM slower and providing
unecessary work for the migration team.

- Added on account at revision:
    https://github.com/odoo/odoo/commit/d2e33ba57c0517b88f3cdf987f6b161883b8272e#diff-f3712147f4b25231caa371bd83265dbeR1415
- Added on sale at revision:
    https://github.com/odoo/odoo/commit/3d3a23c9196b84e2189c89c107fbdf09024cca48#diff-eb374e5f26e99054eaf8b40daaebf6f9R118
2018-02-28 16:49:21 +01:00
Nicolas Martinelli 971ed88798 [FIX] crm: change email alias
- Change the 'Default Alias Name for Leads'
- Save

The value remains 'info'.

opw-1816238
2018-02-28 16:35:54 +01:00
Rémi Rahir 002bf77df3 [FIX] crm: incorrect description of phone validation module
The curent behaviour of the 'phone validation' module will only format a
number to the national conventions IF possible and will never block a
user.
The term of 'Validation' isn't suited.
2018-02-28 15:58:57 +01:00
Nicolas Lempereur 8438470c3a [FIX] project: kanban needaction link well shown
When something like this is in a html content:

```
  <a href="hello">
    <div>
      <b>this</b>
      <a href="world">!</a>
    </div>
  </a>
```

browsers may correct it to:

```
  <a href="hello">  </a>
    <div>
      <a href="hello">
        <b>this</b>
      </a>
      <a href="world">!</a>
    </div>
  </a>
```

which breaks our CSS.

This change transforms the inner tag in a button tag.

opw-1817668
closes #23373
2018-02-28 15:36:18 +01:00
Arnold Moyaux 2c5022b4f3 [FIX] purchase: orderpoint should redirect to linked PO
Since procurement order removal. We lost the behavior
to access PO directly from the orderpoint.
In 10.0 the puchase button redirect to the procurement order
and the purchases were accessible from the procurement order.

We do not have the procurement order anymore thus the button
return to a list view with all RFQ and PO.

Fixes #23096
2018-02-28 15:36:27 +01:00
Goffin Simon c7526407ab [FIX] stock: Wrong production/scrap/adjustment location used in multicompany
- When using perpetual inventory valuation, the accounts used for scrap, manufacturing,
and inventory adjustment operations are set on the corresponding locations .
- In a multicompany environment, you will have a separate chart of accounts for each company.
- Account fields on locations are not property fields.
- Therefore, in order to separate the accounting of manufacturing, scrap, and inventory
adjustment operations, you must use a location for each operation for each company.
- Set up one location for each company for scrap, production, and adjustment
locations, setting the company field on each.

Bug:
- When attempting to create a MO, inventory adjustment, or scrap order while signed
in to the second company, you will receive a permissions error on stock.location.

Fix:
- Now the right location is taken according to the company of the user.

opw:1817339
2018-02-28 15:32:30 +01:00
Olivier Colson d1377650da [FIX] account: prevent the user from assigning to an account a tax belonging to another company than the one the account is linked to. 2018-02-28 15:27:48 +01:00
Laurent Smet bff30f58c5 [FIX] base: disable the copying of the res.company
When copying a company, the default accounts/journals are copyied too.
The chart_template_id and the opening move are also copyied.
To conclude: copying a company is a very bad idea that leads to a lot of access rights issues.

-githug issue: 21213
2018-02-28 15:19:48 +01:00
Christophe Simonis dae9b1a10e [FIX] account: correct move reversal
Oversight of previous forward-port
2018-02-28 13:56:11 +01:00
Christophe Simonis 0261d6d595 [MERGE] forward port branch 9.0 up to 239f4fec29 2018-02-28 13:41:04 +01:00
Laurent Smet d5d2a33424 [IMP] account_analytic_default: get the analytic acc. based on commercial_partner_id
The suggested analytic account must search based on the commercial_partner_id instead of
the partner_id field.

E.g. create an invoice with 'Agrolait, Thomas Passot', the analytic account 'Agrolait' wasn't set by default.

-github issue 21401
2018-02-28 13:32:18 +01:00
Aaron Bohy d4126f7278 [FIX] web: DomainSelectorDialog: prevent overflow
The DomainSelectorDialog behaves differently from classical dialogs
in terms of height and overflow: (1) its height can be larger than
the screen height, and (2) its content is never scrollable
(overflow visible).

However, before this rev., the 'height: auto' rule ensuring (1)
didn't apply, so the dialog's height was limited to the screen's
height, and when it had to much content to display, it overflowed.

It didn't work because the code tried to apply the rule too soon,
so the .modal-dialog element was not yet available.

Fixes #23292
2018-02-28 12:04:33 +01:00
auyeung112002 b2c321fd1f [FIX] account: dummy_account_is should be readonly
Setting dummy_account_id to readonly avoid the journal entry items being wrongly set automatically.
2018-02-28 12:02:03 +01:00
Nicolas Martinelli 26325dc943 [FIX] sale: sale_count
- Create a user with Inventory access but no Sales access
- Access a product

An AccessError is raised because the user doesn't have access to
`sale.report`.

We hide the stat button if user has no access to Sales, and moreover we
do not compute the sales count in this case.

opw-1815436
2018-02-28 11:59:52 +01:00
Laurent Smet 91be355bf9 [FIX] account: set "Financial Report" print action invisible
This action is generic to print the account reports (in community).
However, it doesn't make sense to call this method from list view because
the data are added explicitly in the _print_report method (in account.common.report).

-github issue 22349
2018-02-28 11:49:09 +01:00
Olivier Colson 239f4fec29 [FIX] account: When modifying the currency or company of a bank journal, also set it on the related res.partner.bank (if set)
See issue https://github.com/odoo/odoo/issues/22980
2018-02-28 11:39:05 +01:00
Nicolas LempereurandHumberto Arocha f0c801778a [FIX] base_import: allow whitespace as empty float
Empty cells containing only spaces may have unexpected results (not
shown traceback and broken import) when being imported and they were
intended for a float or monetary field.

To avoid the error we could either, ignore left/right whitespace when
parsing a float value (so same behavior as en emtpy cell) or prevent the
error and get an friendly import report error:

 ' ' does not seem to be a number for field 'Name of Field'

This change choose the first way, so a float ' ' (just whitespace) will
be considered as '' (empty).

opw-1816784
closes #23105
closes #23355

Co-authored-by: Humberto Arocha <hbto@vauxoo.com>
2018-02-28 11:17:21 +01:00
Sergei Ruzki 0dc32e6b8c [IMP] base_iban: add support of IBAN code for Republic of Belarus
Was PR #23058. Courtesy of Sergei Ruzki
2018-02-28 11:10:01 +01:00
Goffin Simon 287516c1a9 [FIX] sale:Empty email sent to followers when confirming the quotation
Steps to reproduce the bug:

- Subscribe another person as follower to all kind of messages in your default sales team.
- Create a new quotation.
- Hit on Send by Email and send the email.

Bug:

A empty email was sent to the followers.

Fix:

Now only the email rendered in the wizard is sent to the followers.

opw:1816028
2018-02-28 10:57:48 +01:00
Laurent Smet c08f563795 [FIX] account: fix access rights of sequence journal
Changing the next sequence number on a journal requires having Administration/Settings access
rights. However, this feature should be available for advisors.

- github issue: 23352
2018-02-28 09:57:10 +01:00
Humberto Arocha 13a59a4610 [FIX] l10n_mx: Add new tag to allow the reporting of importation taxes
This is needed in the DIOT report (l10n_mx_reports)
2018-02-28 09:46:25 +01:00
Lucas Perais (lpe) d396ed515c [FIX] website_sale_delivery: avoid double conversion to currency on delivery provider
Yourcompany is in currency USD
Go to the website and select the CAD pricelist
Have Fedex installed (then you'll have to set weight on the product you buy)
*Expected with DHL and generally any API driven delivery*

Make an online order to the USA but in CAD

Before this commit:
At the "Choose your delivery method" step
You'll see that the amount for Fedex that seems to be 'converted twice' into CAD
(And it is)

This is because there is a slight mismatch in how delivery compute their price
When the delivery is fixed, or based on a rule
Its price is always in terms of its company's currency
Whereas
in other delivery type, the price is computed in terms of ther order's currency

See the difference between the implementation of the  methods:
<get_price_available>
and
<provider_get_shipping_price_from_so>

OPW 1813466
2018-02-28 09:14:10 +01:00
Lucas Perais (lpe) b6d4cd5deb [FIX] account: reconcile on move reversal
Make an invoice for partner X
Make a payment from partner X (not using the register payment button)
On the invoice, you'll see your payment proposal

Now, reverse the move of the payment

Before this commit:
On the invoice you *still have* the payment proposal
This is because nothing reconciled the reversed entries with the original ones when they were created

After this commit:
The reversed moves are reconciled one on one with their original counterparts
And the original payment doesn't show up anymore on the invoice's proposal

OPW 1816462
OPW 1816641
2018-02-28 09:08:38 +01:00
Florent de Labarre 6c044b3675 [FIX] base : prevent unallowed launch
Do not allow to trigger the cron manually (e.g. via RPC call)

Closes #23157
2018-02-27 18:02:58 +01:00
Olivier Sarrat f620e78301 [FIX] doc: remove readonly as button possible attrs
According to #13264, setting a button as readonly is not working
Remove from the documentation

Closes #23114
2018-02-27 17:54:56 +01:00
qsm-odoo a206cca404 [FIX] base: properly layout contact name + country flag
Commit https://github.com/odoo/odoo/commit/13ee5596c6dd32b3471ce705b62b54ea59c00431
broke the behavior by changing a <t> to a <div> for no apparent reason.

(opw-1819038)
2018-02-27 17:03:27 +01:00