Commit Graph
110261 Commits
Author SHA1 Message Date
Paulius Sladkevičius 32041a7f67 [CLA] company merge of HBEE and Versada
Closes #15546
2017-02-17 15:43:46 +01:00
Luis Ernesto Torres Macías 4cb1750a61 [FIX] base: correct Mexican state code based in SAT catalog
The SAT provide this catalog to state codes:
http://www.sat.gob.mx/informacion_fiscal/factura_electronica/Documents/Complementoscfdi/catNomina.xls

This attribute is required in payroll v1.2.
Previous code version did not match the validation

Closes #15535
2017-02-17 15:04:56 +01:00
Wolfgang Taferner 17caa7076d [FIX] point_of_sale: restore removed but used images
Used in the big scrollbars display in CSS

Closes #15523
2017-02-17 15:00:05 +01:00
Denis Ledoux e5747410c9 [FIX] product_visible_discount: sale price for pricelist based on other pricelist
For a pricelist based on another pricelist,
the price of the product is the price in this other
pricelist.

To get the price of a product in a specific pricelist,
the field `price` must be used, along with the right `pricelist`
passed in the context when browsing the product.

Without this, the sale price is considered the sale price
indicated on the form, in the product company currency,
while the pricelist on which is based the currenct pricelist
could give a specific other price, in another specific currency.

e.g.:
Watch, Sale price 690CHF
Public USD Pricelist, setting the sale price of the watch to 790 USD
Reseller USD Pricelist, discounting 60% based on the public pricelist price, discount shown.

Before this revision, the sale price of the watch was marked
690 USD, with a sown discount of 54,xx %

With this revision, the sale price of the watch is marked at
790USD, with a shown discount of 60%, as expected.

opw-708301
2017-02-17 14:54:46 +01:00
Denis Vermylen 0a989d6532 [FIX] hr_holidays: fix refusing multiple leaves
wrong use of self in loop, should've been holiday.
2017-02-17 14:12:53 +01:00
Florent de Labarre 942d8a2c3f [FIX] product: complete name_search
The name_search was not working properly if limit=None is specified (e.g.
searching for the search bar on a many2one field to product.template).

As `any int > None` is true, the condition is always validated as soon as the
search returns at least one result.
The product.product search has no limit parameter and use the default 100.
If the 100 first products have only a few templates (a lot of variants), the
result will be incomplete as stopping after the first iteration.

Closes #15477
2017-02-17 14:11:28 +01:00
Yenthe V.G 731569aed2 [CLA] add Wardm95 to VanRoy CCLA
Closes #15548
2017-02-17 13:52:08 +01:00
Christophe Simonis ac11bfd927 [MERGE] forward port branch 9.0 up to a7531810f3 2017-02-17 11:42:12 +01:00
Christophe Simonis a7ad263fc9 [MERGE] forward port branch 8.0 up to 5de7500a41 2017-02-17 11:27:43 +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 a7531810f3 [IMP] doc: more explicit section name
A section for uncategorised methods.

Fixes https://twitter.com/mannequin/status/832360802422312962
2017-02-17 11:10:14 +01: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
Goffin Simon 40507c4ad9 [FIX] purchase: null stock_moves creation
Backport of 1f6ec2b8d6

When the quantity of a purchase order line is manually decreased and if
the purchase order line as been generated by more than one procurement.
If the new quantity is lower than the quantity of the smallest
procurement, it is impossible to validate the picking containg the
stock_moves created by the purchase order validation.

It is impossible to validate the picking, because it contains
stock_moves with 'product_qty' set to 0. Those stock_moves are generated
during the validation of a purchase order.

To fix this issue, we avoid the creation of stock moves with a
'product_qty' set to 0 which has no sense.

opw:708099
2017-02-16 16:58:49 +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
Martin Trigaux a2cf865dfe [FIX] point_of_sale: use valid sequence on pos.order.line
2 sequences are created when a pos.config is created:
- one for pos.order, stored in sequence_id field
- one for pos.order.line, link is lost, like dust in the wind ♫

When creating a pos.order.line from a new order, the default value was using the
first sequence if found using the code 'pos.order.line' (returning the latest
created).

The name of the line was always using the same sequence, whatever the config
used.

In master, the field has been stored at 645df676 but in stable version, the
following hack is done:

As the sequences are created in the same transaction as the pos.config, the
create_date will be the same to the microsecond.
The name of the config can not be used as too easily changed (e.g. duplicate)
and may not be unique.
Done in SQL to avoid ORM cleaning of microseconds, not working with a search.

opw-703092
2017-02-16 15:34:52 +01:00
Denis Ledoux 5de7500a41 [FIX] sale: stuck workflow in invoice before delivery
With a sale order with:
- a stockable product
- the `Create Invoice` policy set to `Before Delivery`

After the quotation validation and the invoice validation,
if the user:
 - cancelled the invoice,
 - then validated it again,
 - then hit `ignore exception` on the sale order
 - then registered the payment on the invoice

The picking of the sale order was not created automatically,
and the sale order was therefore stuck.

Actually, it was just a write trigger that was missing:
The condition for the sale order workflow to go to the next state
is that the `invoiced` boolean is set to True.

It was, when the invoice of the sale order was paid
(after having registered the payment), but since
this is a computed field, not stored, no write operation
was actually performed on the sale order, and the workflow
wasn't "notified" that a change occured for the `invoiced` boolean.

A simple write on the sale order (e.g. in its notes) would
have unblock the situation, though.

This trigger ensures the worfklow to be notified when
the invoice of the sale order is paid, and therefore
when the `invoiced` boolean is set to `True`.

opw-706591
2017-02-16 11:20:20 +01:00
Cedric Snauwaert 5ed80452d1 [FIX] account: missing depends when computing total amount of invoice
self.type is used inside method but is not present in the dependencies.
OPW 706029
close #14187
2017-02-16 10:34:08 +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
Christophe Simonis e2c8752b6b [MERGE] forward port branch 9.0 up to 22ac4deb94 2017-02-15 17:23:56 +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
Nicolas Martinelli 3908956193 [FIX] account: company contact data
Avoid exposing information that could be sensitive.
2017-02-15 14:33:14 +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
Nicolas Martinelli 1b653178b6 [FIX] account: company contact data
This is a complement of previous commit.

As a portal user, access one of your invoices from the frontend
(download the PDF). The generation of the report crashes because of an
access error. The error arises when trying to access the company banking
information displayed in the report footer.

opw-708581
2017-02-15 13:27:20 +01:00
Nicolas Martinelli ad50324a8e [FIX] base: company contact data
As a portal user, access one of your invoices from the frontend
(download the PDF). The generation of the report crashes because of an
access error. The error arises when trying to access the company contact
information (address, phone, fax...) displayed in the report footer.

This is due an API migration error (7eab8e26d3). Before the migration,
the partner was browsed in `_get_address_data` as:
`address = part_obj.read(cr, openerp.SUPERUSER_ID, ...`

After the migration, this is not browsed as superuser anymore.
Therefore, users with limited access rights won't be able to read it
anymore.

opw-708581
2017-02-15 13:04:47 +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
Adrien Dieudonne d506199988 [FIX] web: set max width for image field in form view
Before this commit, wide images were larger than the form view.
2017-02-14 16:02:57 +01:00
Aaron Bohy 0e6eb9687f [FIX] web_kanban: load grouped field if not in view
In the kanban view, if we try to group by a field that is not
defined in the arch, some features (like 'Add a new Column')
are not available because the case is not correctly handled.

To fix it, a RPC is done to load all fields in this case.
2017-02-14 15:07:10 +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
Ravi Gohil 22ac4deb94 [FIX] account: crash if no default journal be set on invoice creation from PO
When creating an invoice from Purchase Order(stat button) if you do not have a journal of type 'Purchase' defined for current user's company, it will crash.
2017-02-14 10:59:54 +01:00
Cédric Snauwaert fe40560c31 [FIX] account: fix bank statement reconciliation writeoff creation
Use case:
Company is in USD, create a bank journal in euro and set euro currency to 0.9
Create invoice for 80 EUR and pay it. Then create a bank statement of 85 EUR in newly created journal and use reconciliation widget to reconcile statement and payment. Put the remaining 5 EUR as writeoff in bank fees. The move created for those 5 EUR wrongly computed the amount_currency of the counterpart, this commit fix this problem.

OPW: 706708

PR #15306
2017-02-14 10:12:15 +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 4a33db44b2 [FIX] account: crash if no currency in payment
- Register a payment on an invoice
- Do not set a journal, and do not set a currency
- Change the amount

It crashes.

opw-706807
2017-02-13 14:32:08 +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
Pedro M. Baeza defbe247e8 [FIX] product: method open_product_template duplicated
Introduced in 3befe66f43
Closes #15463
2017-02-13 10:39:22 +01:00