Commit Graph
117156 Commits
Author SHA1 Message Date
Goffin Simon e61c442f18 [FIX] website_quote: Duplicating a quote with a template
When duplicating a quotation with a template, the order date is set
to today's date. But the validity date was duplicated which was wrong.
Now the validity date is computed according to the template and not duplicated.

opw:744671
2017-05-30 09:31:08 +02:00
Aaron Bohy 625110d527 [FIX] web: Form: don't reload twice on button clicked
For example: open a draft quotation, click on 'Confirm sale',
before this rev., the record was reloaded twice (each RPC done to
load the data was duplicated). This was actually tested, but the
tests didn't mock well the behavior of the ViewManager, so they
couldn't detect that those RPCs were done twice.
2017-05-30 09:29:06 +02:00
Nicolas Martinelli abb71fea51 [FIX] sale: add team_id in refund
Introduced incorrectly in account by 4cbbbaddd5
2017-05-30 09:24:53 +02:00
Nicolas Martinelli 065e3b70fe [IMP] account: fields of refunds streamlined for better inheritance
Based on work by @wtaferner
2017-05-30 09:24:53 +02:00
Carlos Lopez d88dcde4f0 [FIX] web: pivot view should use col_group_by and measures key
For historical reasons, when the pivot view was rewritten, we lost the ability to understand the measure and col_group_by keys from the context.

It was actually a deliberate decision, because we decided that it was not possible to properly handle the colgroupbys in the search views, so we replaced that mechanism with pivot_col_group_by and pivot_measures keys exported by the view, when necessary.

Sadly, we did not properly remove the outdated keys from the xml files.  So, with this commit, we reintroduce those special keys, because 10.0 is a stable version.  Note that this will be removed in master.

 (PR 17119)
2017-05-30 09:12:38 +02:00
Aaron Bohy 27463eadab [FIX] web: FieldMany2Many: don't save if nothing changed
Suppose that there is a many2many list (non editable) in a form
view. When one of the many2many subrecords is edited (from the
form view in a dialog), it is saved directly when the user clicks
on 'Save' in the dialog.

Before this rev., if the user clicked on 'Save' in the main form
view after editing a m2m subrecord, a 'write' RPC was done, whereas
there were nothing left to save (as the subrecord had already been
saved).
2017-05-29 20:53:40 +02:00
Aaron Bohy 45bce324f3 [FIX] web: BasicModel: correctly apply x2many changes
Suppose that we have a form view with a one2many list (non
editable) containing a record. In edit mode, the user clicks on
that record to edit it in a form view (in a dialog). In this form
view, there is an x2many field that isn't in the list. Before this
rev., it crashed when the user clicked on 'Save' in the dialog
after editing the value of the x2many.

This was because the basic model didn't use the correct fieldsInfo
in that case (it use the fieldsInfo of the list view instead of the
one of the form view, and the x2many field isn't in the list).

Also ensures that the record is correctly saved even if editing the
x2many is the only change done, as this wasn't the case before.
2017-05-29 20:53:40 +02:00
David Arnold cd6ff51bfa [IMP] lead: improve extensibility of partner create method
Before this commit _lead_create_contact actually constructed values AND
created the partner in one single step, making it difficult to override
in localizations that affect the partner model.

As containing method already existed, the partner creation was moved up
to this method, and the method was renamed to match with the file's
conventions. Now this method cleanly constructs the values.

Closes #16493 .
2017-05-29 18:19:43 +02:00
Luis González ed4b9064a1 [FIX] web: Properly label buttons which change views, with aria-label
Closes #16576

Description of the issue/feature this PR addresses:
According to HTML good practices, when an element is used but there's no text displayed on the screen, the attribute aria-label should be used to label that element.

This is the case in the buttons to change view types (List, Kanban, etc) since there's no text displayed, but an icon instead.

This HTML attribute is specially useful for screen readers, which usually are not able to figure out a button's functionality when that button is not properly labeled.

Current behavior before PR:
Buttons are not properly labeled

Desired behavior after PR is merged:
Appearance should be the same, but the produced HTML should be of better quality, because it would fit more HTML good conventions and it whould be more accessible

Related issue:
I had already reported this issue on the branch 10.0 at PR #16030. However, I decided to report it on this branch, because I believe this branch is the right place to be reported.
2017-05-29 18:14:00 +02:00
David Tran 0857c65515 [FIX] account: Set field in _onchange_partner_id even if a warning is raised
Closes #16801

When a warning is set on partner profile, _onchange_partner_id method in
the invoice returned the message before assigning account_id,
payment_term_id, fiscal_position_id. hence, those fields come with empty
value.
2017-05-29 17:52:43 +02:00
tarteo b853573ff1 [FIX] board: fix 'Add to my dashboard' margin issue
Board module allows to add favorites to my dashboard. This is an option
added by the board module under Favorites menu item of search view.
However its margin is incorrect and displays badly compared to other
options in search view.
2017-05-29 17:36:55 +02:00
OstapYakovenko 4bde8defbf [CLA] corporate signature MaAO
Closes #17265
2017-05-29 17:27:24 +02:00
Yenthe V.G 1a685089be [FIX] portal: untranslated error message
And specify which group is incorrect

Closes #17275
2017-05-29 17:01:46 +02:00
Yenthe V.G 42a3c66424 [FIX] stock: untranslated errors
Closes #17277
2017-05-29 16:56:11 +02:00
qsm-odoo 7dcb8fea64 [IMP] web: make backdrops appear on top of older modals
When opening a modal on top of another, we expect the associated
modal-backdrop to be over this another modal (so that it is grayed).
This was not the case as bootstrap forces the modal-backdrop z-index
to a lower value than the modal's one (see fix comments in the changes
below).
2017-05-29 16:53:02 +02:00
Ruchir Shukla 02f05e9fef [FIX] martketing_campaing: Check if record related to res_id exists to compute res_name
Closes 16971

If the record with id `res_id` on the model `res_model` doesn't exists anymore, do not call name_get method on it in the method `_compute_res_name`. That could lead to tracebacks or inconsistencies.
2017-05-29 16:47:13 +02:00
Yenthe V.G 5cf2bb6ec9 [FIX] pos_mercury: missing translation ability
Made the error message more understandable

Closes #17276
2017-05-29 16:45:25 +02:00
Yenthe V.G c8d132f751 [IMP] base: remove length of pass and user fields of ir.mail_server
Indeed in some cases those could be longer than 64 characters. As
there is no real constraint let us drop the limit to simplify it.

Closes #17269 .
2017-05-29 16:34:43 +02:00
Thibault Delavallée 0849677548 [FIX] purchase_requisition: fix taxes_id field being created with records instead of ids
Fixes #16222
2017-05-29 16:32:45 +02:00
Géry Debongnie 5788ee8a1c [FIX] web: prevent crash when exporting all data
In the list controller, some code to determine the active domain to
export was causing a crash.  It was easy to see: just select all records
in a list view, then click on 'Export' in the sidebar.

Note that the data_export code is still quite old, and did evolve
organically.  It does not conform to our new design principles, in
particular, the way component should communicate. But this is a task for
another day.
2017-05-29 16:20:45 +02:00
Laurent Smet e06b039642 [FIX] account: fix traceback when resetting invoice to draft (#17262)
Due to a bad refactoring of this method during the remove of the
'report' module, a traceback occurs when resetting an invoice to draft.
This is due to the retrieve_attachment method that is used as an api.model
instead of api.multi.
2017-05-29 16:05:49 +02:00
Goffin Simon e9d6dcf16f [FIX] stock_account: get_invoice_line_account in valuation = 'periodic'
Let's consider the product category PC in valuation = 'periodic' and the product P
with the category PC.

When creating a vendor bill with P, the account on line doesn't have to be
the stock input account but the expense account.

opw:744409
2017-05-29 15:55:47 +02:00
Yannick Tivisse 003328ec82 [FIX] product: Display the variants in the same order for one product
Currently the variants are ordered by the attribute value in the name_get. That way, all the attributes aren't displayed in the same order.

Ordering by the variant attribute name will solve this issue.

Closes https://github.com/odoo/odoo/pull/17034
2017-05-29 15:12:22 +02:00
Lucas Perais (lpe) d11df4f7b7 [FIX] account: search account.journal also by shortcode
OPW 744362
GH-17102

Closes #17178
2017-05-29 14:52:25 +02:00
reinka ed36285e34 [CLA] Signature for reinka - bloopark 2017-05-29 14:49:46 +02:00
reinka 859a77ca8b [FIX] website_sale: fix order_id from session when cart is reset
Redirection to confirmation page at the end of the checkout process
in case of a previous cart reset by the user.

This commit closes #16145
2017-05-29 14:49:37 +02:00
qsm-odoo 0bb3f21964 [FIX] web: domain selector's inputs design
Since the new views, the 'o_input' class has to be added on form
elements for them to be correctly styled.
2017-05-29 14:41:58 +02:00
Wolfgang Taferner 26e88569c5 [IMP] account: fields of refunds streamlined for better inheritance
Closed 17065
2017-05-29 14:21:33 +02:00
lreficent 8761cf57bb [9.0][FIX] purchase: fix Unread Messages filter
In v9 the right filter to use is based upon the message_needaction
field coming from mail.thread . Indeed this gives records containing
messages demanding an action which is the right way to use the
needaction mechanism in 9, like done in all other addons inheriting
from mail.thread.

Closes #16769 .
2017-05-29 14:10:53 +02:00
lreficent 9c3ef52a32 [CLA] Lois Rilo Antelo
Related to #16769 .
2017-05-29 14:10:24 +02:00
Martin Trigaux 014f9e96b1 [FIX] mrp: format date in user format
Instead of hardcoded YYYY-MM-DD
t-options was introduced in 10.0

Fixes #12341
2017-05-29 14:00:41 +02:00
Antonio Espinosa a0ff74b78d [FIX] website_mail: do not propagate csrf_token to message_post method
Indeed through portal users can post a message. Form used in order to
do so include a csrf token. However this one should not be propagated
to message_post because it is not a mail_message model field.
This creates unnecessary warnings.

Closes #13956 .
2017-05-29 13:57:10 +02:00
Jerther a0ea3304d1 [IMP] doc: add missing doc on kanban groups
group_create, group_delete and group_edit were missing

Closes #17218
2017-05-29 13:42:19 +02:00
Luis Torres bf201e9014 [IMP] l10n_mx: Complete fiscal regime catalog
To CFDI 3.3 the SAT provide the new catalog that need be used to
"RegimenFiscal" node used by the company that emit the documents.

Definition:
Atributo requerido para incorporar la clave del régimen del
contribuyente emisor al que aplicará el efecto fiscal de este
comprobante.

And the attribute need the code from the catalog, and validate that it exist.

In CFDI 3.2 the attribute was required but free. Then the code also
could be used in CFDI 3.2.

Like fiscal position have not field to save the code, is used the next
structure

`code - name`

And when is used this element in the XML generation take only the first
three characters.

`company_id.partner_id.property_account_position_id[:3]`
2017-05-29 13:25:08 +02:00
qsm-odoo b21426ab9c [FIX] web_editor: properly match snippet options' DOM
Backport of 10.0 commit: 5331a87f81

The snippet options are attached to `closest`, `all` and `is` functions
to be able to find/check DOM they are associated to. Their behavior
depend on the snippet option type: the search in the DOM is either done
in the body, the editable parts, the editable children only, ....

The problem is that when searching from a given DOM element, jQuery
won't match the elements whose selector contains this given DOM element.
Or in code terms, jQuery find function behavior is:
`$('A').find('A B')` <=> `$('A A B')` (not `$('A B')`)

This was indeed a problem on the job position apply form pages where the
main editable element is the <form/> element itself. Indeed, the snippet
options' selectors which began by 'form' were not able to match. Worse,
the selector is used for a jQuery search for drag & drop and saving but
not for initialization (where it is used as a `is` check on clicked
elements). So, some DOM were able to be modified by options but not
properly (re)configured before saving.

opw-705902
opw-741305
2017-05-29 13:14:22 +02:00
Uku Lagle 97790089c4 [FIX] website_sale: do not display unavailable pricelists
It should not be possible via /shop/change_pricelist/<pl_id>
to change to a pricelist that is not marked as selectable.

is_pricelist_available method should do that, but is not,
because it calls get_pricelist_available with show_visible=True,
instead of show_visible=False

:param bool show_visible: if True, we don't display pricelist where
selectable is False (Eg: Code promo)

Closes #17220
2017-05-29 12:25:54 +02:00
Germana Oliveira 8ee9cec4d5 [CLA] add goliveirab to Vauxoo's CLA
Done at #17200
2017-05-29 12:23:21 +02:00
Yenthe V.G f08c70b357 [FIX] pos_mercury: Display warning in user's language
Closes #17261
2017-05-29 12:15:27 +02:00
Géry Debongnie bbf724e401 [FIX] web: properly support password attribute for fields
With the new views, the special attribute password was no longer
supported.  We simply reintroduce in this commit proper support to
display password fields with *.

Note: we may want to display passwords with a static number of *, but
this requires some thoughts on the usability of the change. We simply
reintroduce the previous behaviour here.
2017-05-29 12:12:45 +02:00
Géry Debongnie cad943d035 [FIX] web_editor: prevent crash with FieldTextHtmlSimple
If the method commitChange from the widget FieldTextHtmlSimple was
called in mode=readonly, a traceback was displayed.  This is not very
common, because most save operations are done in mode=edit, but it can
happen in readonly mode: when the user clicks on an action button, then
the form view is saved, if necessary.

To reproduce this bug, just open a form view for res.users, and click on
the Change Password button.
2017-05-29 12:12:44 +02:00
Yannick Tivisse fa1a09f6e8 [FIX] l10n_do: Remove useless and unknown field spoken_langages
This field is used with the multilang module. As only one language is spoken in Dominican Republic, this definition is useless and furthermore it raises a warning in the logs.
2017-05-29 12:10:36 +02:00
gustavovalverde 74c8053449 [FIX] l10n_do: Add 18% tax to Communication tax group
When changing the 18 tax by the communication group, the 18 tax has
to remain
2017-05-29 11:58:57 +02:00
gustavovalverde 7bda65e90e [IMP] l10n_do: Add CoA missing accounts, add tags
Description of the issue/feature this PR addresses:

The Chart of Accounts was missing accounts needed for correct
inventory valuation using perpertual method, and also a seggregation
for payroll accounts, to differ employee retentions from company
contributions.

Current behavior before PR:

Wrong accounts used for perpetual inventory valuation
Payroll accounts not showing difference between employee retentions and company contributions
Regulatory reports are hard to make without the right accounts tag
Desired behavior after PR is merged:
The correct accounts are now created and assigned for inventory valuation. And payroll accounts are correctly segregated for the payroll rules coming in the next PR.

The accounts will also have their corresponding tags for having regulatory reports based on the "control account" for hierarchy, which was removed in v8.

This changes are also needed for a WIP of a PR coming to the
Enterprise repository, for building legal reports based on account
and tax tags.
2017-05-29 11:57:13 +02:00
Jesus Zapata e4e320feb7 [CLA] add JesusZapata to Vauxoo's CLA (#17237)
Closes #17237
2017-05-29 11:43:35 +02:00
Yenthe V.G 5e652c856d [FIX] hr_timesheet_sheet: Display warning in user's language
Closes https://github.com/odoo/odoo/pull/17254/files
2017-05-29 11:28:42 +02:00
Richard Mathot 5c0355c033 [FIX] stock: missing grand total for inventory valuation
(was working in Odoo 9.0)
2017-05-29 11:26:16 +02:00
Martin Trigaux 731b23cf4f [FIX] hr_expense: remove duplicated field
Courtesy of Yenthe
2017-05-29 11:20:42 +02:00
Yenthe V.G 61f6756a7c [FIX] payment_authorize: add missing translation ability
Closes #17257
2017-05-29 11:17:15 +02:00
Josean 62cf9dd0fd [CLA] corporate signature for landoo
https://github.com/odoo/odoo/pull/17251
2017-05-29 11:13:46 +02:00
Josean 366c1e307f [FIX] base: Correct typos for 2 spanish states
Closes https://github.com/odoo/odoo/pull/17251
2017-05-29 11:13:46 +02:00