Commit Graph
128477 Commits
Author SHA1 Message Date
Sapan Zaveri fe59754c52 [IMP] account: warn when invoice date is future
Before this task,
There was no warning message when invoice date is set in
future.

task-2053068

closes odoo/odoo#35796

Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2019-08-19 06:57:29 +00:00
Christophe Simonis 51354fadb0 [MERGE] forward port branch saas-12.3 up to 50e571acf7
closes odoo/odoo#36491

Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-09-11 09:39:33 +00:00
Saad Thaifa 50e571acf7 [CLA] Corporate signature for Karizma Conseil
closes odoo/odoo#36642

X-original-commit: 8fbb3c4a68bb1ba2f1863c1172b4f50c130a0ed2
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-09-10 14:22:41 +00:00
Saad Thaifa a2eaf79663 [FIX] l10n_ma: Fixed CoA
- fixed account types for few accounts
- set reconcile field for few accounts
- added new 'Achats des prestations de service'(code: 61263) account
- reflected accounts in chart template configuration

was task: 1913323
diff taken from PR #30772

X-original-commit: b04477dfa69517a93c3f2209ee98749e30741541
2019-09-10 14:22:41 +00:00
Christophe Simonis 9ae6a2f6fe [FIX] stock: correctly works on non unique recordsets
Followup of 3d6e917899 to avoid leaking
the company of first warehouse on all others when writing on multiple
records.

closes odoo/odoo#36656

X-original-commit: ca5def07346ac85bfb53304d6a73aaa85882d3d8
Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-09-10 17:50:10 +00:00
Lucas Perais (lpe) 3c43fb61a3 [FIX] account: i18n: de: online sync partner form
In german
In account > settings
click on add a bank account

search for a bank that doesn't exist
And click, on the middle of the modal, on "create ..."

Before this commit, it crashed, because the term was wrongly translated

After this commit, it opens the form view to create a bank account

OPW 2068507

closes odoo/odoo#36652

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2019-09-10 15:44:35 +00:00
Yoshi Tashiro 1eee83c362 [CLA] update quartile CCLA
Add nakometal

closes odoo/odoo#36648

X-original-commit: dea26325f517594d975c3cba8fd90fe707c999ab
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-09-10 15:07:12 +00:00
Nicolas Martinelli 256f099586 [FIX] website_blog: feed when no posts
When no post exist for a blog, accessing `/blog/<id>/feed` crashes
because `blog.blog` has no field `post_date`.

opw-2066587

closes odoo/odoo#36591

X-original-commit: 2a16935ab86cb9635704ce03ef925b80954ca247
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-09-10 07:30:28 +00:00
Goffin Simon 18335d355e [FIX] payment_sips: Wrong test and production URLs
The production/test urls were inverted.

opw:2061123

closes odoo/odoo#36623

X-original-commit: 5325c4388c5cae38b78b88d74220f3a5dca3fc26
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2019-09-10 11:59:26 +00:00
Nicolas Martinelli 0cda05853e [FIX] website_blog: Latest Posts
On the website, when the widget "Latest Posts - Big Images" or "Latest
Posts - List" is added a 404 error is raised in the console.

This is because the regular expression of the background image is too
'greedy' and also match the trailing double quote, e.g.:
`website_blog.blog_post_cover_02"` instead of
`website_blog.blog_post_cover_02`.

By making it match the minimum pattern, the trailing double quote is not
selected.

opw-2061596

closes odoo/odoo#36622

X-original-commit: 0797a4ab90ec4d9be55e16d917da98909ce0ece4
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-09-10 11:59:10 +00:00
Lucas Perais (lpe) 0c5409f254 [FIX] sale: i18n: fr: translation downpayment
Before this commit, a french translated term missed the string format symbol
It crashed when making a so with a downpayment and issuing invoices

After this commit, the term is corrected, and no crash occurs

OPW 2069089

closes odoo/odoo#36574

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2019-09-09 14:45:12 +00:00
RomainLibert 988e201d2e [FIX] lunch: allow location_id to be NULL
In case the last location of a user was NULL in databse, lunch was
crashing because lunch_kanban was adding an undefined leaf to the load
domain.

closes odoo/odoo#36571

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-09-09 14:04:12 +00:00
Nicolas Lempereur 25bba05710 [FIX] account: wrong html in AR translation
This translation causes a traceback when opening accounting app in
arabic.

opw-2068360
opw-2068513
opw-2069010
closes #36570

Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2019-09-09 14:02:04 +00:00
Romain Estievenart 00d65a9495 [FIX] calendar: Attendance buttons doesn't exist on mobile
Step to reproduce :
For small screens
 > enter the debug mode
 > go to the calendar app
 > access one of your meetings
 > access the tab "invitations"
 > try to change the state of attendance

It's due to the missing kanban view used by the o2m field 'attendee_ids'
We had to create this missing kanban view to allow theses actions on mobile.

opw-2058770

closes odoo/odoo#36501

Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2019-09-09 11:42:53 +00:00
Florian Gilbert da6f24bb4c [FIX] account: Add 'to_check' field on account_move entry view.
This field has been removed unintentionally here: beaa30a3d1

closes odoo/odoo#36540

Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2019-09-09 07:28:24 +00:00
Joren Van Onder 5e13e13a20 [FIX] payment_authorize: create a customer profile for ACH transactions
The response profile of an ACH transaction won't contain a credit card
number since ACH transactions use bank accounts instead. It looks like
this:

<getCustomerPaymentProfileResponse
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd">
  <messages>
    ...
  </messages>
  <paymentProfile>
    <billTo>
      <firstName>XXX</firstName>
      <lastName>XXXX</lastName>
      <address>XXX XXX XXX</address>
      <city>XXX</city>
      <state>XX</state>
      <zip>XXXXX</zip>
      <country>XXX</country>
      <phoneNumber>XXXXXXXXX</phoneNumber>
    </billTo>
    <customerProfileId>XXXXXXXXX</customerProfileId>
    <customerPaymentProfileId>XXXXXXXXX</customerPaymentProfileId>
    <payment>
      <bankAccount>
        <accountType>checking</accountType>
        <routingNumber>XXXXXXXX</routingNumber>
        <accountNumber>XXXXXXXX</accountNumber>
        <nameOnAccount>XXX</nameOnAccount>
        <echeckType>WEB</echeckType>
      </bankAccount>
    </payment>
  </paymentProfile>
</getCustomerPaymentProfileResponse>

This causes the transaction not to get confirmed in Odoo:

...
File ".../authorize_request.py", line 241, in create_customer_profile_from_tx
  res['name'] = response_profile.find('paymentProfile/payment/creditCard/cardNumber').text
AttributeError: 'NoneType' object has no attribute 'text' - - -

To solve it fall back on the accountNumber if there's no cardNumber.

opw-2062784

closes odoo/odoo#36298

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-09-05 17:25:27 +00:00
Josse Colpaert 16c1abf339 [IMP] account: add method to get payments
closes odoo/odoo#36228

Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2019-09-04 14:14:58 +00:00
Raphael Collet eef48811ff [FIX] models: callable in api.depends() sees valid _rec_name
Determine `model._rec_name` before the dependencies of the fields.  The
compute method of the automatic field `display_name` uses a callable
depends that retrieves `model._rec_name`.

closes odoo/odoo#36476

Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-09-09 10:07:06 +00:00
Odoo Translation Bot 71cc792c94 [I18N] Update translation terms from Transifex 2019-09-08 06:21:59 +02:00
Lucas Perais (lpe) 54049c14b3 [FIX] portal: should depend on auth_signup
portal uses methods defined in auth_signup
without depending on it (probably counting on the autoinstall)

So before this commit, you could uninstall auth_signup
but every flow involving portal - making share urls - crashed

This commit adds the dependency

OPW 2064883

closes odoo/odoo#36477

Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-09-05 12:58:58 +00:00
Olivier Colson 3405ca4d0b [FIX] account: tax lock date: check constraint when saving instead of posting
Makes 12.4 compatible with these changes, from 12.3: https://github.com/odoo/odoo/pull/36289

closes odoo/odoo#36318

Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2019-09-02 10:24:02 +00:00
Olivier Colson 0058e12469 [IMP] account: display product in account.move.line's form view
Before that, there was no way of opening the product related to an invoice line once the invoice had been validated.

closes odoo/odoo#36336

Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2019-09-02 13:11:22 +00:00
mgh-odoo 1086b6403c [FIX] mail: activity type "Default User" field shown twice
Also moved "Default Description" before "Scheduled Date"

Task-Id 2056407

closes odoo/odoo#35882

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2019-09-03 08:22:33 +00:00
Odoo Translation Bot 4af010bdec [I18N] Update translation terms from Transifex 2019-09-01 06:24:20 +02:00
Nicolas Seinlet e6ee38e89c [TYPO]
closes odoo/odoo#36258

Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-08-30 08:07:13 +00:00
Lucas Perais (lpe) 0aa4bd1da9 [FIX] l10n_in: adapt invoice and report to new taxes
Before this commit, printing an invoice crashed
This was because of the refactoring of taxes

After this commit, the invoice prints well
and the specific taxes amount appear in the right columns

OPW 2060259

closes odoo/odoo#36244

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2019-08-29 15:20:54 +00:00
Raphael Collet 63b3297af3 [FIX] models: _rec_name when field x_name is discarded
closes odoo/odoo#36617

X-original-commit: 32ca79940b1608495cb08c2272add5216685af71
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-09-10 10:38:12 +00:00
Christophe Simonis 9bf0b04adb [MERGE] forward port branch 12.0 up to 82a8cdd6f2 2019-09-06 17:52:48 +02:00
Christophe Simonis 82a8cdd6f2 [MERGE] forward port branch saas-11.3 up to 091aa33190 2019-09-06 16:51:57 +02:00
Christophe Simonis 091aa33190 [MERGE] forward port branch 11.0 up to f048652ca7 2019-09-06 16:08:58 +02:00
Olivier Colson e270efff2e [FIX] account: tax lock date: avoid posting account moves that would impact the tax report before the tax lock date
The previous version of this verification was buggy and inadequate. It was for example impossible to post an account.move before the tax lock date, even if it did not impact the tax report in any way.

closes odoo/odoo#36289

Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2019-09-06 11:00:17 +00:00
RomainLibert d4fab012f6 [FIX] l10n_ae: forward port broke this
closes odoo/odoo#36502

Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2019-09-06 11:07:13 +00:00
Raphael Collet f048652ca7 [FIX] models: callable in api.depends() sees valid _rec_name
Determine `model._rec_name` before the dependencies of the fields.  The
compute method of the automatic field `display_name` uses a callable
depends that retrieves `model._rec_name`.

closes odoo/odoo#36479

Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2019-09-06 09:02:51 +00:00
Raphael Collet 96266bfe54 [FIX] models: callable in api.depends() sees valid _rec_name
Determine `model._rec_name` before the dependencies of the fields.  The
compute method of the automatic field `display_name` uses a callable
depends that retrieves `model._rec_name`.

closes odoo/odoo#36480

Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2019-09-06 09:02:19 +00:00
Sébastien Theys c6bb103eac [IMP] website: avoid computing multi_website_ qcontext if not useful
Those values are only used on the website navbar when the user is in both groups
so the vast majority of the time they are done for no reason.

This reduces the number of queries by 2 on every page when the user is not admin
and/or multi website is not enabled.

Part of task-2061122

closes odoo/odoo#36483

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-09-05 14:53:16 +00:00
Nicolas Martinelli 3cadfebf0f [FIX] account: avoid traceback in auto-reconciliation
Commit 6b6d290a5b made sure that the list of candidates was not
empty to avoid a zero division. However, it might still happen that the
`total_residual` is zero.

We make sure to avoid the zero division in this case.

opw-2058784

closes odoo/odoo#36482

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-09-05 13:45:49 +00:00
Jorge Pinna Puissant 2581693b5d [FIX] mrp: warning message in production order report
— create a bom which uses 5.6 units of a product;
— make a production order;
— reserve the materials (all materials should be available);
— print the production order report.

Before this commit, a warning message in the report that says : 'All
components could not be reserved. Click on the "Check Availability
button" to try to reserve components'. This warning message is shown
despite the fact that all the components are reserved. This occurs
because of a rounding error.

Now, the warning message only when a component could not be reserved.

opw-2058921

closes odoo/odoo#36462

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-09-05 13:37:12 +00:00
Goffin Simon b4a1b87fb6 [FIX] mrp: domain on field final_lot_id in mrp.production.work.order.form
Steps to reproduce the bug:

Let's consider two storable products P1 and P2 where P1 is tracked by serial number
- Create a BOM B  for P1 where P2 is a component
- Create a serial numberv SN for P1 with no quantity
- Create a MO M1 for P1 and click on button "Produce"
- In the view MRP Product Produce, SN is selectable in the field lot_id
- Now change B and set a routing on it
- Create a new MO M2 for P1 and click on produce
- At least one WO has been created, click on the first one

Bug:

- SN is not selectable in the field final_lot_id

The domain set on the field final_lot_id:

"['|', '&', ('product_id', '=', product_id), ('product_id.tracking', '!=', 'serial'), ('use_next_on_work_order_id', '=', id)]"

didn't allow to chose SN.

With this fix, it's now possible to chose SN on the first WO created for M2

opw:2059745

closes odoo/odoo#36425

Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2019-09-05 09:35:39 +00:00
Nicolas Martinelli a3f2c82789 [FIX] stock, mrp: merge SFP for 2 different MO
The condition needs to be fined-tuned, so revert for now.

This reverts commit 40487aca5c.

closes odoo/odoo#36470

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-09-05 12:29:43 +00:00
Lucas Perais (lpe) 7c28c97724 [FIX] hr_expense: sheet multi expense partial payment
Create two expense and put them into one sheet
Post the sheet

Make One partial payment with the wizard (Register Payment)
Do it again for the residual amount

Before this commit, it crashed because the second payment tried to reconcile
itself with an already reconciled line

After this commit, all the lines that need to be reconciled
actually are without crash

OPW 2065501

closes odoo/odoo#36454

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2019-09-05 09:22:20 +00:00
Nans Lefebvre 85b9f3abfd [FIX] product: pricelists with temporary discounts
Create a pricelist with a temporary discount on some product only for today.
Go to the shop. The discount is applied on the product.
Add the product to the cart.
Go to the cart page (review order): the price does not use the discount.

Because the query getting the pricelist item is some handwritten SQL,
it only works for dates, and not e.g. in the case of datetimes.
So the pricelist item encoding the discount is not retrieved, and thus not used.

It turns out e.g. in _website_product_id_change it gives a datetime in context,
explaining why sometimes the discount is applied, and sometimes not.

We use fields.Date.to_date as it should work on all date formats we shall pass.

Co-written with @sbbaro

opw 2054881

closes odoo/odoo#36453

Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
2019-09-05 08:58:07 +00:00
Christophe Simonis a4fe211ee2 [MERGE] forward port branch 11.0 up to cd1b56b41f 2019-09-04 16:31:43 +02:00
RomainLibert c7f11aae6e [FIX] hr_holidays: aggregate attendances using day_period and dayofweek
Before this commit, if you had defined multiple attendances for the
morning or for the afternoon, the system would only use the first
attendance defined for either morning or afternoon.

This lead to wrong computations of the real leave length.

This commit fixes this issue by getting the min(hour_from) and
max(hour_to) for the attendances using a read_group.

closes odoo/odoo#36413

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-09-04 11:36:04 +00:00
Goffin Simon cd1b56b41f [FIX] account: Wrong amount due when reconciling with refund
Steps to reproduce the bug:
- Let's consider the following currency rates: 1.00 for USD and 0.50 for EUR
- Create invoice I with the same currency of your company (USD) and amount due = 100$
- Validate I
- Create refund R with  a diffenrent currency of your company (EUR) and amount due = 1€
- Validate R
- Reconcile R with I

Bug:

The amount due of I was 196$ instead of 98$

PS: The root of this issue was coming from function assign_outstanding_credit that was called when
reconciling R with I. This function changes the currency_id and the amount_currency of the account move line.
So the function _amount_residual defined on model account.move.line was triggered as
the currency_id was changed. In _amount_residual, the residual_amount_currency was computed.

Forward-port up to saas-11.3

Closes #36252

opw:2062103

closes odoo/odoo#36412

Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2019-09-04 11:04:26 +00:00
Christophe Simonis 6143de52ad [MERGE] forward port branch 11.0 up to 923fb7aa05 2019-09-04 11:33:04 +02:00
Jorge Pinna Puissant 92990ad30e [FIX] i18n: missing Slovenian translation
Slovenian language, as many others languages, is not present in the
beta/master projects in Transifex.

For some reason, Transiflex removed all current translations, this was
already fixed in 12, but as there are not automatic forward-port for
translations, this is a manual forward-port.

opw-2060055

closes odoo/odoo#36374

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-09-03 11:32:39 +00:00
Christophe Simonis 7895044a79 [FIX] web: unpatch test Views earlier
We need to unpatch the view as soon as we correcly applied the
`groupedBy` attribute to avoid sub views to also be patched.

closes odoo/odoo#36486

Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-09-05 13:43:51 +00:00
Christophe Simonis 41f7befb8e [FIX] web: correctly await promises in forward-ported test 2019-09-05 13:41:59 +00:00
Christophe Simonis 02a8490f05 [FIX] web: use defined variable
Oversight of previous forward-port.
2019-09-04 20:14:15 +02:00
Jorge Pinna Puissant dc5a8b1b30 [FIX] website_sale_coupon: promotion program image
Before this commit, when using a promotion program ('I have a promo
code') in the shopping cart in the e-commerce, the image of the
promotion product is only shown if the user is connected.

opw-2056968

closes odoo/enterprise#5343

X-port/Cherry-pick of odoo/enterprise@88e1ab31d2

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2019-09-04 19:40:17 +02:00