Commit Graph
103218 Commits
Author SHA1 Message Date
Olivier Dony 26b8bf52d0 [FIX] web: typo in 88594416a6 2016-03-31 12:53:25 +02:00
Goffin Simon bbb317c547 [FIX] crm: merge partner
It is not allowed to merge a partner with one of his parent.

opw:673104
2016-03-31 11:54:25 +02:00
Cedric Snauwaert 90650245d0 [FIX] account: update-check should allow aml with debit=credit=0
Problem: if we try to validate an invoice with a line with a discount of 100%,
this will create an aml with debit=credit=0 and reconciled flag as True.
So when trying to cancel invoice, it is not possible because the check tell us
that there is an entry which is reconciled and we can't unreconcile that entry,
so the check should just ignore line with debit-credit=0.
Also add readonly to general_account_id related field on account.analytic.line.
This is to prevent a write while creating the account_move_line in the case of an
invoice with analytic account.
2016-03-31 10:31:29 +02:00
Denis Ledoux 6e07ae5a5c [FIX] google_drive: Generate Google Authorization Code URL
When checking `Attach Google documents to any record`
in the general settings, if you are not redirected
to a module, but, instead, the current page is refreshed
(the wizard is reloaded instead of creating a new
configuration wizard),
the default value for `google_drive_uri` was not correctly
loaded, the `client_id` in the URL
remained `False` because the wizard was not being
re-created, but reloaded,
and therefore `default_get` hasn't been re-called,
and the `client_id` changed
(it was added to the system parameters after
the installation of the module)

Therefore, the link did not include the correct
`client_id`, and it leaded to the inabibility
to use the URL:
401. That’s an error.
The OAuth client was not found.

Replacing the simple char fields by a function
field, with the correct store trigger,
force the URL value to be reloaded
when the system parameter is inserted.

opw-673274
2016-03-30 16:15:36 +02:00
Nicolas Martinelli fd8570770d [FIX] website_portal_sale, website_sale_(*): access to orders
When a user tries to access one of his orders, the order is shown empty.
This is due to the domain which is applied as an "access check" attempt
and might filter out the order.

The fix directly checks the access rights of the user regarding the
sales order, and return a '403' code if necessary.

opw-671107
2016-03-30 13:33:33 +02:00
Denis Ledoux 4b6218874a [FIX] account: re-introduce get_formview_id for invoices
`get_formview_id` returns a view id to open
the document with. This method is meant to be
overridden in addons that want to give
specific view ids for example.

A link to an invoice must open a different form view
according if this is a customer or a vendor invoice.

This is handled by overriding `get_formview_id`
and returning the view id that should be used
according to something in the record
(e.g. according to the `type` field).

It was present in 8.0, it was somehow
removed in Odoo 9.0 during the refactoring
of the accounting modules, probably
for a wrong reason.

opw-673246
2016-03-30 13:26:19 +02:00
Denis Ledoux 8bb6704b4b [FIX] rating: rating as public
If the user is not connected with his portal account,
but has the right token to rate,
he should be able to.

opw-673231
2016-03-30 12:06:18 +02:00
Goffin Simon 1b5c2ced45 [FIX] website_mail: internal mail messages
The portal user and the public user don't have to see the internal mail messages
linked to a quotation.

opw:672373
2016-03-30 11:30:14 +02:00
Denis Ledoux 69fa2d5662 [MERGE] forward port of branch saas-6 up to 8f1782b 2016-03-30 11:23:18 +02:00
Denis Ledoux 8f1782bd05 [MERGE] forward port of branch 8.0 up to 1d5db336 2016-03-30 11:08:57 +02:00
Denis Ledoux 1d5db33638 [FIX] website_sale: perform onchange as sudo
This revision is related to 9752aedb4e

It looks like in some cases, the user cannot read the
partner associated to his own cart.

This is the case when shopping without being signed in.

opw-673187
2016-03-30 11:06:08 +02:00
Nicolas Lempereur b21382bdd1 [FIX] web_editor: Cannot read property 'left' of undefined
This issue happen for example on a full runbot when clicking with
shift + key pressed on a sale order not in an editable.

We can see that initial_data.rect is only defined in mousedown when the
click target is inside an editable block, hence it could lead to an
issue otherwise.

closes #11527
2016-03-30 09:56:23 +02:00
Nicolas Lempereur 109c529c49 [IMP] web_editor: inline buttons shown over topbar
Before 9.0 web_editor separation in 8c55904, some style would make
inline button be visible over topbar.

This commit reintroduce that and also make the margin over the inline
editor content a little bigger (so the inline buttons on the top of a
content will cover a little less the topbar).

closes #11526
opw-671649
2016-03-30 09:54:05 +02:00
Goffin Simon 0d2d1dbca2 [FIX] website_portal_sale: amount due in Invoices and Payments template
The amount displayed in the website(my account) for the invoices must be
the amount due and clicking on payment button let the customer paying
this amount.

opw:671234
2016-03-30 09:34:52 +02:00
Goffin Simon cfe6716e11 [FIX] hr_payroll_account: onchange_contract
Journal on payslip has to be taken from employee's contract if it is set.

fixes #11188
2016-03-30 09:21:53 +02:00
Olivier Dony ae015cc9c5 [FIX] pricelist: no early rounding of computed price
The pricelist computation should not immediately
apply the currency rounding to computed prices,
to allow for unit prices with arbitrary precisions.

This way users can use a higher decimal precision
for "Product Price" than what is allowed for their
currency. This is useful e.g. to obtain exact
subtotals prices when combining small prices with
large quantities.

The resulting price will be rounded appropriately
when it gets stored to the destination field anyway.
2016-03-30 03:50:13 +02:00
Olivier Dony 742c7b4c2f [FIX] website_event_track: use image_medium avatar
The default image field is usally too large for use
as a speaker avatar.
The implementation of the field should have been
a simple "related" field too, instead of a custom
computed field.
2016-03-30 03:47:24 +02:00
Olivier Dony 5b5324cb9f [FIX] website_forum: avatar route now uses 128x128 image
Many users upload large images for their avatar
(multi-Mb files). This makes most forum pages
longer to load than necessary, and wastes bandwidth.

128x128 images (`image_medium` field) are sufficient
for displaying avatar pictures on posts and profiles.
2016-03-30 03:47:23 +02:00
Olivier Dony 88594416a6 [FIX] web: CSV export: avoid triggering formulas
When exporting text data in CSV format, values
beginning with '=', '+' or '-' will usually be
mistaken by spreadsheet applications as formulas
upon CSV import.
That will often cause the cell to display an
error message instead of the actual contents,
such as "#NAME?"

Prefixing them with a single quote makes them
pure text cells. The special single quote
character is usually hidden by the spreadsheet
in that case.

Numbers and other types of values are not affected.
2016-03-30 03:43:40 +02:00
Denis Ledoux 461162f3ec [FIX] calendar: display_start and stop are not private
Add `display_start` and `display_stop` to the fields
which are public even if the event is marked as private.

There is no reason it should be public,
especially if `start` and `stop` are. Besides,
this leads to issues in
`get_search_fields`, when doing:
```
sort_fields['sort_start'] = browse_event['display_start'].replace(' ', '').replace('-', '')
```
opw-672997
2016-03-29 16:13:07 +02:00
Nicolas Martinelli 04f896b135 [FIX] warning: onchange_partner_id
When the warning module is installed, `onchange_picking_type` is not
called anymore.

When the method `onchange_picking_type` was introduced, it was not taken
into account that the warning module would change the onchange property
on the `partner_id` field thanks to the method `onchange_partner_id`.

opw-672091
Fixes #11342
2016-03-29 16:00:31 +02:00
Nicolas Lempereur 9be7a9535c [IMP] web_calendar: matching pivot and calendar week number
To format Week numbers in the pivot view, babel is used with format
`'W'w YYYY` in the current locale (eg: en_US) which will determine
print the week in the locale week numbering type.

This is inconsistant with the fullcalendar version (1.6.4) in Odoo until
at least version 9.0 where ISO is used by default. This behaviour has
been changed in more recent version of fullcalendar and is now in tune
with pivot view, but updating fullcalendar should be done in master.

This commit customize the week numbering on the old version of
fullcalendar getting the yearned result without updating fullcalendar.

This is only possible in saas-6 since momentjs is only present since
saas-6 and is required for this fix.

closes #11522
opw-653671
opw-668711
2016-03-29 14:23:00 +02:00
Goffin Simon 11d3aaf848 [FIX] purchase: origin field on "procurement.order"
The field origin is not required in "procurement.order" and
trying to concat a string with a boolean raises a Type Error.

opw:670307
2016-03-29 12:21:49 +02:00
Nicolas Martinelli c26fa293c8 [FIX] stock: get quants domain
The call to method `quants_get_preferred_domain` is not correct anymore
after commit 6ef158b63.

opw-672973
2016-03-29 11:49:23 +02:00
César Castillo 36ef20fe52 [FIX] doc: duplicated text in themes.rst
close #11502
2016-03-29 11:32:00 +02:00
Manuel Vázquez Acosta ad979b71a2 [FIX] account: account balances computation
Commits 7b7f3fa and d6c88b8 filter out special periods from the account
balances. However, this filtering is not necessary anymore for a closed
fiscal year. The result is that the opening balance becomes wrong as
soon as the previous fiscal year is closed.

This commit fix this by computing the balance over all fiscal years.

Closes #11515
2016-03-29 11:17:58 +02:00
Odoo Translation Bot 8d9b309f9a [I18N] Update translation terms from Transifex 2016-03-27 03:14:28 +02:00
Odoo Translation Bot f02b8a76df [I18N] Update translation terms from Transifex 2016-03-27 00:32:16 +01:00
pvy 825c02ff58 [FIX] l10n_nl: 2 taxes were forgotten during the taxes tags overhaul 2016-03-25 17:08:32 +01:00
Goffin Simon 2225a1992d [FIX] sale: _get_advance_payment_method
When there is at least one invoice already linked to the SO, the
default advance payment method must be 'Invoiceable lines (deduct down payments)'

opw:672911
2016-03-25 16:54:40 +01:00
Peter Hahn c2abdbbc37 [IMP] Make many2many widgets in listview usable for one2many
Existings many2many widgets in ListView can be used also for one2many if
the supplementary data is provided for the column.

closes #11282
2016-03-25 16:54:32 +01:00
Denis Ledoux 949da8affa [FIX] crm: re-apply 71b0a4c
It was somehow lost with
e48c50bb10
and
30a7ef804a

opw-672974
2016-03-25 16:49:10 +01:00
Martin Trigaux eeffda9689 [I18N] website_quote: missing terms in .pot file 2016-03-25 14:45:12 +01:00
Xavier Morel fc40772926 [FIX] scaffolding: packaging
Packaging doesn't include non-imported python file because
redhat. Oblivious, revision 8e81abfeb5
renamed .py.template files to .py thus breaking scaffolding from
packaged odoo.

Revert that specific change.

Fix #11050
2016-03-25 14:42:32 +01:00
Xavier Morel 4a31f85c5a [FIX] base_import: CSV import error from windows
Missing bit from #10374: because the _read_xls function is a generator
it is *entirely* lazy and Python doesn't execute *any* code when it's
initially called, which means the file is actually (tentatively) parsed
when the first line is requested which happens outside of
_read_file (and thus of the fallback mechanism implemented by #10374).

Fix by splitting _read_xls between the opening of the workbook (eager)
and the actual iteration (which remains lazy).
2016-03-25 13:13:23 +01:00
Thibault Delavallée 3b26d1e2fd [FIX] mail: default reply to with multiple alias
When having multiple aliases matching a record, take the first one coming
in the order instead of the last one. This way the defined order is effectively
taken into account.
2016-03-25 12:40:46 +01:00
Thibault Delavallée 554f70f218 [FIX] crm, hr_recruitment, project_issue: responsible
When using the mailgateway, the responsible of the newly created lead / applicant /
issue is explicitely set to False since the original mailgateway commit in 2010.

However this conflicts with some custom behavior that tries to set the responsible
on the same objects. Notably in recruitment the responsible is set to be the
recruitment responsible set on the job, if any.

In this commit we replace the explicit set of user_id=False to using a
default_user_id=False in the context. This way the admin or mailgateway user
will not be responsible of every new records. And this enables custom behavior
to find a responsible.
2016-03-25 12:40:34 +01:00
Nicolas Lempereur 918e1b06bc [FIX] website_blog: .cover_narrow removed when cover removed
opw-668713
2016-03-25 12:21:33 +01:00
Nicolas Lempereur 85eda0c55f [FIX] web_editor: two editor and image bar buttons
Some image functionalities of the inline summernote would only take the
first of multiple editor into account when selecting the targeted image
of an image button action (image size, image padding, ...).

This commit select the appropriate editor given the current editable.

closes #11474
opw-668861
2016-03-25 11:39:57 +01:00
Nicolas Martinelli 62792a8ff6 [FIX] purchase: purchase count
After commit cb01be23, the states have changed.

opw-671989
2016-03-25 10:43:33 +01:00
Goffin Simon cb435481c0 [FIX] account: _get_counterpart_move_line_vals
When the move_id was not set in the invoice, the field number
is False and making False + a string raised a type Error.
2016-03-25 09:28:33 +01:00
Martin Trigaux 40a299c580 [FIX] base: mildly privileged user accessing partner form
A user in base.group_erp_manager (Access Rights) but NOT in base.group_system
(Settings), will try to fetch the list of groups to generate selection fields
to represent groups selection.

As the method `_is_admin` only verifies the user belongs to group_erp_manager
and the model ir.module.category requires group_system for read access rights,
`fields_get` method tries to fetch the groups and fails with a security warning.

The user fields are fetched when a res.partner form is loaded as the field
user_ids (one2many) is present in the form view of partner in invisible.

opw-672435
2016-03-24 18:15:32 +01:00
Denis Ledoux e9bcaad09e [FIX] website: partial revert of 6207644
Before this revision, it was possible to use the
`/website/image` controller using kwargs only
e.g.
`/website/image?field=datas&model=ir.attachment&id=718207`

After, it's no longer possible.

It was assumed `/website/image` without any argument
in the route itself (`<xmlid>`, `<field>`, ...)
could simply never be called,
but this is not the case.

We therefore restore it by retro-compability purposes.
2016-03-24 18:05:31 +01:00
Nicolas Lempereur a23e850f63 [FIX] website_blog: narrow_cover and overriding header
The narrow cover option new in 9.0 has no meaning if the content can
overflow it (it would overflow the cover and hide the blog content).

opw-668713
2016-03-24 17:29:57 +01:00
Christophe Matthieu 5ab43773cb [FIX] ir.qweb: can't edit t-field content if modified by inherit xpath 2016-03-24 16:20:28 +01:00
Joren Van Onder 5fe5618b7e [FIX] point_of_sale: make invoices use the fiscal position on pos.order
We have to ensure that the invoices generated through the POS always
reuse whatever fiscal position is set on the pos.order. Both in the
front- and backend a user can change the fiscal position to be different
from what is set on the customer of the order.

opw-668155
2016-03-24 16:12:13 +01:00
Christophe Simonis 21337b43a8 [MERGE] forward port of branch 8.0 up to d519dac 2016-03-24 15:03:55 +01:00
Christophe Simonis d519daca1d [MERGE] forward port of branch 7.0 up to f1b9b30 2016-03-24 15:02:45 +01:00
Damien Bouvy a2c5fe4a64 [FIX] website_portal_sale: ACL are too wide for employees
In revision 15b8f35, we decided to 'let ACL and ir_rules
do their job', which is an excellent idea for portal
users but a catastrophe for employee users (since, with
ACLs and rules, they have access to an giganormous amount
of SO, invoices, etc.), which made the server timeout for
big databases.

This commits reintroduces a limitation of the search that
matches ir_rules for portal users but which should limit
the number of elements visible to employees.
2016-03-24 14:34:23 +01:00
Denis Ledoux 5e84021cbb [FIX] product: fixed price decimal priecision in pricelist
The fixed price decimal precision must use the same precision
than the other price field referencing a product price,
as this field is expected to contain a product price.

opw-672877
2016-03-24 14:31:40 +01:00