Commit Graph
107276 Commits
Author SHA1 Message Date
Yenthe V.G 731569aed2 [CLA] add Wardm95 to VanRoy CCLA
Closes #15548
2017-02-17 13:52:08 +01:00
Nicolas Martinelli 432234c4d4 [FIX] hr_payroll: worked days calculation
In a salary slip, change the end date of the period. The "Worked Days"
are not recomputed.

Fixes #15404
opw-707897
2017-02-17 02:20:47 -08:00
Martin Trigaux 5b424e5f97 [IMP] doc: replace oersted by OdooRPC
oersted is deprecated in v10
OdooRPC is cool and pink
2017-02-17 11:00:33 +01:00
Martin Trigaux 0f05432374 [FIX] doc: OpenERP -> Odoo and broken links 2017-02-17 10:31:17 +01:00
Pierre Masereel d63bb0837b [FIX] maintenance: maintenance team and duration in cron
When you define recurring maintenance requests on an equipment, the
maintenance duration and the maintenance team is not set on the created
requests.

The problem comes from the creation method called by the cron that
doesn't use the duration and maintenance team to create new requests.

We now use these fields in the request creation
2017-02-16 16:13:02 +01:00
Christophe Simonis a7abfb9e18 [FIX] l10n_jp: correctly define fiscal position taxes
*.template records needs xmlids in order to be instanciate.

Close #15384
2017-02-15 19:19:45 +01:00
qdp-odoo 45d338afe9 [FIX] l10n_jp: fix installation crash (at the second install)
* The module was not loading the fiscal position templates before executing the template generation.
* Also, as reported in #15384, at the second installation it was crashing because of a missing xml id (which is not supported currently). This last bug was fixed by giving specific xml_ids instead of skipping the data.

This reverts commit 929d983575.
2017-02-15 17:20:56 +01:00
Goffin Simon 65f986c018 [FIX] sale: Wrong fix in test_onchange_product_id
Due to wrong fix introduced by 982816ed7b
and introduced by 9367fe3cd3
2017-02-15 16:52:40 +01:00
qdp-odoo 982816ed7b [REV] sale_expense, sale: revert wrong fixes on tests, and wrong fix of broken test's fixes that broke tests instead of fixing them... bummer
This reverts commit da32c9ce9d.
This reverts commit 9367fe3cd3.
2017-02-15 16:29:10 +01:00
Goffin Simon 929d983575 [FIX] account: create_record_with_xmlid
In some cases, the records have no xml_id like

in module l10n_jp, the way the account.fiscal.position.tax.template
are declared in account.fiscal.position.template.csv doesn't set
an xml_id for these records. So when using, the function create_record_with_xmlid
it raised an error if the record has no xml_id because it tried to concate
a string with a boolean with "str(company.id)+'_'+template_xmlid.name".

Fixes: #15384

opw:707704
2017-02-15 15:21:35 +01:00
Goffin Simon da32c9ce9d [FIX] sale: currency change
To avoid currency problem introduced by 9367fe3cd3
2017-02-15 15:15:22 +01:00
Christophe Simonis d88b95969c [FIX] mail: manage Environment before using it
This is needed for crons that happen to send notifications. Without it,
the email sending was delayed until the `process email queue` cron run.
2017-02-15 14:50:58 +01:00
Andrea Stirpe 85fe21f19b [IMP] l10n_nl: update Author name
Brand Onestein instead of company name

Closes #15488
2017-02-15 13:54:41 +01:00
Laurent Smet 9367fe3cd3 [FIX] sale_expense,sale: fix tests that depend of the USD currency
The assertEqual compare arbitrary amounts related to the USD.
This leads to error when changing the currency of the base.main_company.
2017-02-15 10:33:23 +01:00
Nicolas Martinelli f472a81e7f [FIX] purchase: unlock PO
Only allows a manager to unlock a PO. Otherwise, when the option
'Confirmed purchase orders are not editable', any user can unlock a PO
and modify it.

opw-707035
2017-02-15 10:31:34 +01:00
Nicolas Lempereur 131cd6c7e0 [FIX] website_sale: update zoomed image on variant
When we select a variant on a product page on the eCommerce, this can
change the product image.

With this commit the change is also reverberated to the picture
displayed by the zooming feature.

opw-708089
2017-02-15 10:06:15 +01:00
Nicolas Martinelli 76e0cb3e95 [FIX] mail: do not update count if message in no channel
When a message is not part of any channel, the message counter is
incremented while the message won't appear in any channel. This leads to
an inconsistency between the number of messages displayed in the status
bar and the actual messages in Discuss.

opw-706884
2017-02-15 09:29:14 +01:00
Pratima Gupta c1c519a056 [FIX] mrp: attrs lot_id required in produce wizard
Commit b2cf955e made the lot_id always required in the
produce wizard of the manufacturing order (without work orders).

It should only be required when the finished product is tracked by lot.
2017-02-14 17:12:16 +01:00
Miku Laitinen 6d9bf4e5f2 [FIX] sale: display discount field
On the customer invoice lines if sale module is installed.
4977bced replaced 4 groups in account and only 3 xpath in sale.

Closes #15493
2017-02-14 16:42:13 +01:00
Nicolas Martinelli 7a03f9ce93 [FIX] web, sale, account: company logo
The notification mail template of a SO and an Invoice displays the logo
of the company. However, the logo is always the logo of the superuser's
company.

When accessing the logo from an email client, the UID is not defined.
Therefore, we fall back on the superuser, and display the logo of his
company.

We add the support of a `company` key in the kwargs, so we can force the
company from which we retrieve the logo. Note that this key was used
elsewhere, such as:

addons/web/static/src/js/web_client.js

opw-705420
2017-02-14 12:14:23 +01:00
Martin Trigaux e8f1c5dbc6 [FIX] account: untranslated popup
The content of the popup message was not translated.
opw-708345
2017-02-14 11:46:52 +01:00
Denis Ledoux 41ffb5032b [FIX] mail, sale, account: company used in notification emails
The `user` variable in the mail templates is the `self.env.user`,
https://github.com/odoo/odoo/blob/10.0/addons/mail/models/mail_template.py#L370

which will always be the administrator in the use case
of a notification email
https://github.com/odoo/odoo/blob/10.0/addons/mail/models/res_partner.py#L151-L156

Using `user.company_id` to determine the company of the sales order
or the invoice is therefore wrong, as it will always be the administrator
company, which can be different than the order/invoice company.

opw-706267
2017-02-13 15:18:23 +01:00
amoyaux 42e6e8c312 [FIX] website_sale: website admin spelling mistake
The mistake was Abandonned Orders instead of Abandoned Orders.

This mistake has been corrected in master with commit 2e40f53279

This commit create an english translation file for stable version 10.0
2017-02-13 14:40:40 +01:00
amoyaux d37b7b5780 [FIX] product_margin: "group by" in product margins report
Trying to use "group by" in the product margins menu creates a traceback with a keyError.

The problem is that the function stores a recordset in the dictionary and then tries to
get it back with an integer.

This commit solves the problem by storing the product id in the dictionary instead of
the product itself.
2017-02-13 14:37:04 +01:00
Nicolas Martinelli 3b42773e83 [FIX] product: crash on product search
- Go to Sales > Product Variants
- In the search field, type a letter (e.g. 'p'), then select a
  corresponding pricelist ('Public Pricelist' in demo data)

=> Crash

This is because `name_search` returns a list of tuple, not a browse
record.

Fixes #15443
2017-02-13 13:22:02 +01:00
Nicolas Lempereur 83b6b71e29 [FIX] gamification: user_domain issue with not all
The field user_domain allow to get the list of users for which a
challenge is applied. The javascript framework for a char_domain widget
sends a JSON list to the server, but the server saved it as a string in
a Char field.

Hence we can have a list (in values received by write or create) or a
string (when getting the field value of a record).

Since 0c649644db this caused an error when user_domain was not empty.

This commit solves it by having _get_challenger_users always receiving a
string.

opw-708177
2017-02-13 12:34:58 +01:00
Martin Trigaux 7c8a721a96 [FIX] point_of_sale: change the model description
a pos.order is not a point of sale, it is an order
2017-02-13 10:58:00 +01:00
Nicolas Martinelli b5b4979dd1 [FIX] mrp: cancel raw materials procurements
To reproduce:
- Create a product A with the routes Manufacturing & Make to Order
- Create a product B with the routes Make to Order & a custom one "Move
  from Shelf 1" (see screenshot for the configuration detail)
- Create a BoM for product A which contains the component product B
- Sell product A in a SO and confirm it
- It creates a delivery order for product A, a manufacturing order for
  Product A & B and an internal transfer for product B
- The move for product B from WH/Stock/Shelf 1 to WH/Stock is indeed
  linked to the move for product B from WH/Stock to Virtual Location/Production
- Cancel the sales order
- All stock moves are cancelled, except the one related to the internal
  transfer (WH/Stock/Shelf 1 to WH/Stock)

When the manufacturing order is canceled, raw material as well as
finished moves are canceled. All procurements with finished moves as
"Destination Move" are canceled as well. However, in this use case, a
procurement has been created for a raw material.

The solution is to cancel procurements for raw materials as well, so it
cancels the internal transfer.

opw-706100
2017-02-13 09:01:10 +01:00
Nicolas Martinelli 2a08cbb8c6 [FIX] mass_mailing: Kanban crash on mobile view
In mobile view, the mass mailing kanban view crashes.

Commit eee1d8c159 aims to prevent drag and drop for mass mailing.
However, in mobile view, the the drag and dropd is by default
deactivated, and "sortable" is not initialized.

opw-708140
2017-02-13 08:53:36 +01:00
Nicolas Martinelli 7b74046200 [FIX] mail: action button translation
- Install a language other than English, set it to your user.
- On any model, send a message  (the recipient should be a user, not a
  simple portal user).
- The recipient receives a notification with a primary button half
  translated, for example "Vue Task".

When the call is performed to method `message_post`, the sessioon
context is not added to the RPC request. Therefore, when the model name
is read (method `_message_notification_recipients`), it is done in the
default language.

Note that this is the case for any RPC request using the `call` JS
function.

opw-707678
2017-02-13 08:45:27 +01:00
Odoo Translation Bot 4669c103cc [I18N] Update translation terms from Transifex 2017-02-12 04:30:17 +01:00
Christophe Simonis 9beca598d4 [MERGE] forward port branch saas-11 up to b5971e417f 2017-02-10 17:32:36 +01:00
qdp-odoo 765dd38ec1 [FIX] account: manual reconciliation wizard in batch.
Several fixes are addressed in this commit:
- displayed value of writeoff amount now give proper result accordingly to the selection (but that selection may still be wrong!). This is still not ideal but at least it reflects what users can see in the list selection.
- exclude from the reconciliation, entries that have already the boolean 'reconciled' set to True. They shouldn't be passed to reconcile() but are still needed to balance totally the reconciliation so users have to select them.
- avoid crash if no writeoff needed on batch reconcile: Even though the wizard might declare that a writeoff is needed, in batch mode it might not be the case since the reconciliation is done in multiple passes for each currency. If no write-off is needed, no write-off move is created and the code tried to add a boolean variable to a recordset and raised a fruit-salad error (mixing apples-oranges).
2017-02-10 15:03:28 +01:00
qdp-odoo 4bdf91a02d [FIX] account: fix 'Unreconciled' filter on account.move.line search view.
This revert commit 1e67069f60 and correctly fix the use case it was addressing (exclude lines with debit=credit=0 in the filter).
2017-02-10 15:03:28 +01:00
Christophe Simonis ffd4442b06 [MERGE] forward port branch saas-11 up to 06e9e45d03 2017-02-10 11:49:35 +01:00
qsm-odoo b5971e417f [FIX] web: hide list readonly checkbox when entering edition
Forward-port of https://github.com/odoo/enterprise/commit/8a55b3f9f7a7524583effb8198c03ebf695131bd

There are multiple problems with the editable view list. It should be
solved once and for all in the work-in-progress master.

This commit fixes a bug with readonly checkboxes. When a field is
readonly, the table cell gets the "o_readonly" class which changes
its style and behavior. When entering edition, the cells are hidden
except the ones with this "o_readonly" class so that their style are
not affected. The "o_readonly" cell content however was hidden thanks
to a "color: transparent;" rule to let the form readonly field show
the value. The problem is that checkboxes... are not hidden with this
"color: transparent;" rule. Also, the "o_readonly" class is not toggled
during edition while the readonly status could be... so the right fix
would be to get rid of this "o_readonly" class and let the inline form
handle the behavior, but this would affect style and possibly break
unknown behavior.

This fix adds rules to handle the checkbox case correctly.
2017-02-10 11:49:05 +01:00
Christophe Simonis 06e9e45d03 [MERGE] forward port branch 9.0 up to 6f29e7307e 2017-02-10 11:21:14 +01:00
Christophe Simonis 6f29e7307e [MERGE] forward port branch saas-6 up to e60ba73e52 2017-02-10 11:12:03 +01:00
Christophe Simonis e60ba73e52 [MERGE] forward port branch 8.0 up to 8cb13c4e4c 2017-02-10 11:09:14 +01:00
Goffin Simon 2f328d3447 [FIX] web: Dashboards error
Steps to reproduce:
Go to any pivot view (for example Sales > Report > Sales) and add
the current view to your personnal dashboard (in the search view: Favourites > Add to my Dashboard)
Go to the dashboard, traceback because $buttons was not defined.

opw:707296
2017-02-10 11:01:03 +01:00
Nicolas Martinelli 3f16ed9ef7 [FIX] mrp: crash onchange
In a MO, change a product in "Consumed Materials" by clicking on "Search
more...". It crashes.

Clicking on "Search more..." triggers the onchange since it empties the
line. Since there is no product on the line anymore, it crashes.

opw-705644
2017-02-09 15:51:08 +01:00
Freeman Helmuth 800a4b6728 [FIX] doc: CentOS spelling
Closes #15408
2017-02-09 15:07:47 +01:00
Joren Van Onder 0556bc6d9e [FIX] point_of_sale: properly round taxes with round_globally
When tax_calculation_rounding_method is configured to round_globally the
compute_all method of account.tax will not round the taxes based on the
currency. The result of the compute_all function is used when creating
the tax parts of a pos.order account.move.

Taxes are aggregated per session, so 2 orders with orderlines in them
with the same tax will turn into 1 single tax account.move.line. To
correctly handle round_globally, we round all tax values we have after
processing each order.

Fixes #14672
Fixes #14673
2017-02-08 10:28:33 -08:00
Denis Ledoux 00cf180862 [FIX] account: register payment with payment, invoice and company having different currencies
In revision fc813847d8,
`_compute_total_invoices_amount()` was assumed to
give the invoice residual within the company currency but,
in the case the payment_currency is different than the company_currency,
it returns the amount in the payment currency.

In this case, we actually need the total invoices residual
within the company currency.
2017-02-08 18:20:10 +01:00
Denis Ledoux 85b7144193 [FIX] account: invoice/payment reconciliation with a change of rate
The amount of the invoice in the payment currency was wrongly
computed when a change of rate in the invoice currency occured between
the invoice date and the payment date,
when the invoice currency was neither the company currency
nor the payment currency.

e.g.
Company in USD. Exchange rates:

    07/02   08/02
HKD 7.0     8.0
EUR 0.90    0.94

Invoice: 100,000 HKD, date 07/02, worthing 100,000 / 7 = 14285,71 USD
Payment: 13000 EUR, date 08/02, worthing 13000 / 0,94 = 13829,79 USD

The invoice amount within the invoice currency was computed:
100,000 / 8 * 0.94 = 11750€
While the invoice, at the time of the invoice date, worth actually
14285.71 * 0.94 = 13428,57€

When the invoice, payment and companies are all different,
the invoice amount in the payment currency must not be computed from
the amount in the invoice currency computed at the invoice date
to the payment currency, since the rate of the invoice currency
changed, and the amount in the invoice currency at the time
is no longer the same today.

In simple words, `amount_currency` of the invoice
was computed using the 7.0 rate
e.g. 100,000 / 7 = 14285,71
while, when the rate changes, computing from the invoice currency to
the payment currency, which are both different than the company currency
it will first convert the amount to the company currency, using the new rate:
e.g. 100,000 / 8 = 12500€
and then convert to the payment currency:
e.g. 12500 * 0.94 = 11750€

opw-640248
2017-02-08 18:20:10 +01:00
Goffin Simon bd01714388 [FIX] stock: Inventory adjustments in multi company
When making an inventory adjustment in multi company,
the default location_id was all the time taken from
'stock.warehouse0' even if the user was not allowed to read
the warehouse. Inspired from _get_default_location in pos_config.py

Backport of 8955d15e9d

opw:706704
2017-02-08 16:49:33 +01:00
mge-odoo 8cb13c4e4c [FIX] openerp: quote read_group SQL query for case sensitive tables
In SQL, if there is no quote around the table/field, the result will
be returned as case insensitive.

This was causing a bug in the kanban view which was not displaying
the records because x_AA_count was named x_aa_count.
2017-02-08 15:55:47 +01:00
Simon Lejeune 7b2bc90d27 [FIX] stock_calendar: do not edit context in place
This method receives a new api context and thus should not change it
directly. The stock scheduler didn't run because of this.

opw 704764
2017-02-08 14:51:06 +01:00
Goffin Simon b8b1d1d0ab [FIX] crm_partner_assign: The field "Level Name" was not translatable
The field "Level Name" must be translateble.

opw:706486
2017-02-08 14:40:09 +01:00
Goffin Simon 685c874236 [FIX] point_of_sale: POS Orders Analysis not clickable
The numbers in the POS Orders Analysis must be not clickable.

opw:707304
2017-02-08 12:51:46 +01:00