Commit Graph

94461 Commits

Author SHA1 Message Date
Denis Ledoux 2939800ed4 [FIX] web: char_domain widget re-renders on model change
Before this revision, the `char_domain` re-rendered its display
only when its domain value was changed.

It must re-render as well when the model on which this domain
is applied is changed, as the number of records can
obviously be different.

e.g., in mass-mailing, when changing the recipients type
from partners to leads, the domain doesn't change, it
stays `['opt_out', '=', False]`, but the model on which
this domain is applied does change, as well as the number
of selected records.

opw-658391
2015-12-08 15:11:20 +01:00
Denis Ledoux 071144b0ac [FIX] mass_mailing,crm_mass_mailing: exclude opt-out
By default, when changing the recipients type of a
mass-mailing to partners or leads,
the selected records included the opt-out records.

To be consistent, as:
 - `opt-out` records are excluded by default for mass mailing contacts
 - the filter excluding the opt-out records
   `Available for mass-mailing` is loaded by default
   when changing the selection in the selection list dialog

The domain for partners and leads should exclude
opt-out records by default.

opw-658391
2015-12-08 15:11:20 +01:00
Christophe Simonis 83a4a582fa [MERGE] forward port of branch saas-3 up to 513cea6 2015-12-08 12:28:41 +01:00
Christophe Simonis 513cea69c6 [FIX] auth_oauth: do not transfer `debug` flag to OAuth provider
This parameter is not part of the spec [1] and may not be supported by
all OAuth providers.

[1] http://tools.ietf.org/html/rfc6749#section-4.2.1
2015-12-08 12:16:42 +01:00
Christophe Simonis 47b2f7ea9e [MERGE] forward port of branch 7.0 up to 3a1c693 2015-12-08 12:16:00 +01:00
FalcoBolger 4ba2e91aa4 [FIX] base_action_rule: pass kwargs when calling create/write's origin method 2015-12-07 12:26:40 +01:00
Goffin Simon 85e33c8e1d [FIX] account_anglo_saxon: incorrect account tax
When changing the account_id of an invoice line, all the tax line,
created from this invoice line and with a tax which has no
"account_collected_id" set, must be set with the same account_id.
Inspired from the function "compute" in model "account.invoice.tax"

closed #9727
opw:657499
2015-12-07 11:29:25 +01:00
Odoo Translation Bot 0de99dd2c8 [I18N] Update translation terms from Transifex 2015-12-06 02:56:34 +01:00
Jeremy Kersten 3a1c693259 [FIX] osv: fix boolean in domain for custom field
When a new column has been added after that some data already exists,
the old lines will keep an empty/null value. So when we search is the new field
is equals to False or if it is different of True, we need to match the null
values.

Backport of de3b64018a
2015-12-04 18:22:32 +01:00
Jeremy Kersten de3b64018a [FIX] osv: fix boolean in domain for custom field
When a new column has been added after that some data already exists,
the old lines will keep an empty/null value. So when we search is the new field
is equals to False or if it is different of True, we need to match the null
values.

close #9925
2015-12-04 16:31:31 +01:00
Goffin Simon cccb2351c4 [FIX] account: Bank statement reconciliation
To avoid to reset the partial reconciliation when the number of selected
lines is different to 1.
2015-12-03 11:24:07 +01:00
Goffin Simon 2749f73f9b [FIX] sale: update_tax in product_id_change
Thanks to the fix 503820a, when a fiscal position mapped an included
tax on a SO line, the price unit of the product is recomputed.
This fix has been applied in the function product_id_change in
the model "sale.order.line"

Before the fix, when changing the product uom on a SO line, the price
unit of the SO line was reset with the pricelist price without taking
into account the fact that a included tax could be removed on the SO line.

To avoid this kind of problem, the price unit must be recomputed in any
case according to the taxes.
2015-12-03 09:21:03 +01:00
Goffin Simon d9f92ba160 [FIX] account: included tax with fiscal position
When creating an invoice with a fiscal position(fp) which maps an included tax(itax)
to an excluded tax(etax). Each invoice line mapped by fp must recompute its unit price
to substract the included tax.
Inspired from 503820a

Closes #9811

opw:658109
2015-12-02 16:47:51 +01:00
qdp-odoo 077a168d4c [FIX] stock_account: counterpart account of a cost price adjustment is more likely the expense account instead of the stock input/output. Backport of commit 57d0903154c562 2015-12-02 16:20:32 +01:00
Christophe Matthieu 4d8ec5f931 [FIX] web: readonly fields not transferred from dialog to 2many field
'write_function' transfer the options to 'write' method from the popup form

Steps to reproduce:
1. Create custom model to add a product quantity on hand(readonly) field on stock.move
2. Show this field on Warehouse>All operations>Create a Transfer> Create: Internal Moves
3. Add a Internal Move, then open it again, the quantity on hand field's value show 0. But change the product, the value is correct.
2015-12-02 13:29:51 +01:00
Martin Trigaux 27d439901c [FIX] base: create translations of a duplicated record
When creating translations (click on blue flag) of a duplicated record, it used
to have the module information of the duplicated record.
It is also not useful to check the module when trying to find if a translation
exists on this record as the res_id is present in the query.

Fixes #9480
2015-12-02 10:57:46 +01:00
Christophe Matthieu ae175d1574 [FIX] website_blog: change_background doesn't work occasionally
Some time new background image, which I set via "Change cover" button don't saved. Because super is called before the jsonRpc and don't wait that the background is saved.
2015-12-02 10:40:16 +01:00
E.R. Spada II fc61bfe993 [CLA] Update eugeconsulting CLA
Add support email.
Closes #9803
2015-12-01 15:56:00 +01:00
Martin Trigaux 44eeb387d3 [FIX] purchase: updating existing PO should keep origin
When a make to order product is sold, a purchase order is created or added to an
existing one. In the second case, the origin of the sale order was lost.
It is now added to the existing source.

opw 656688
2015-12-01 15:23:46 +01:00
Christophe Matthieu 1cd03ed7fe [FIX] web: one2many set_value must use dataset last_default_get as default values 2015-12-01 13:41:28 +01:00
Christophe Matthieu 0ba248aeda [FIX] web: prevent default value changes
Load record use values as dataset and change object value (for eg: add virtual id in the default value object).
2015-12-01 13:41:28 +01:00
Denis Ledoux 06eccf5a54 [FIX] event: located dates in events name
The user timezone wasn't respected in the events name.

e.g. for a user with timezone UTC+1,
for an event
from 12/01/2015 00:00:00
to   12/02/2015 00:00:00
The dates in the event name were set to
(2015-11-30 - 2015-12-01)
while it must be
(2015-12-01 - 2015-12-02)

opw-657962
2015-12-01 12:32:14 +01:00
Goffin Simon c02d0287d8 [IMP] account: Bank statement reconciliation
It was impossible to make a partial reconciliation with several lines.
Each time a new line is proposed for the reconciliation, the previous
partial reconcialtion is canceled. The partial reconciliation can just
be proposed on the last selected line when:
self.get("balance") * (last_line.debit - last_line.credit)<0
2015-12-01 11:07:08 +01:00
Odoo Translation Bot cc82f7518f [I18N] Update translation terms from Transifex 2015-12-01 00:28:25 +01:00
Martin Trigaux 1f07b9429c [FIX] base: update translations should not duplicate the terms
When a translated term is modified (e.g. content of an email.template),
reloading the translations of the module (e.g. when updating the module) used to
recreate a new, duplicare translation for the modified term (instead of ignoring
the existing one).

This was due to the fact the matching expression (find_expr), when loading
translations, used the field 'src' (source term) as criteria for (almost) all
ir.translation records.

While this is true for type 'code' or 'selection', this is not true for 'model'
where the source content may have been changed.
In case of translation of type 'model', matching on the name and res_id should be
enough for the matching expression and then, avoid creating duplicated
translations.

Note: this patch must NOT be present in 9.0 due to the xml_translate
attribute that splits an xml content into small parts.

opw 654031
2015-11-30 16:41:56 +01:00
Martin Trigaux a70287d42c [FIX] base: set module when creating translation
When creating missing translations on an object (e.g. using blue flag icon on a
field), the value of the module was not set.
This was problematic as could create a duplicated translation when the module
was updated or the translation reloaded (as the module is used in find_expr).

opw 654036
2015-11-30 16:41:56 +01:00
Denis Ledoux 31e8bb8e9d [FIX] mail: better signature detection
This revision back-ports revisions
983d5eb9fa
&
ccbb8e09a6
regarding this signature regex.

Besides, it adds the fact the dashes have to
be at the beginning of the line
to make them detected as a signature.

opw-655834
2015-11-30 14:48:59 +01:00
Denis Ledoux eb5d95b135 [FIX] product: _get_image_variant is used for the field `image`
This revision is related to 93d4db9d1e.

Usually, for models with an image, the original `image` is stored
in the field `image`, and then the resized value are in the fields
`image_medium` & `image_small`.

In the specific case of the product variant, this is not the case,
the original image is stored in the field `image_variant`,
and the `image` field uses as well the method `_get_image_variant`.

The `image_get_resized_images` must therefore return the "big image"
as well, which is returned with the key `image`, by default.
This is done using the method argument `return_big`.
2015-11-30 13:51:25 +01:00
Martin Trigaux 44248a07a5 [FIX] base,share: error in_group_xx on user form
res.users form contains virtual fields in_group_ID to be added in res.groups.
Groups with boolean share=True (added by share module) must not be displayed in
the form and should not be modifiable through the user interface.
However, if a module adding/modifying a res.group is earlier in the dependency
graph than 'share' (e.g. only depends from 'base'), the update of the user view
is done before share is loaded and the overrride of 'get_application_groups' is
never executed.

As we can not guarantee that the module is share loaded, put the logic of
hidding the module in base instead of share.

This workaround is quite hacky but is necessary in stable version.
Better fix in 9.0 at cf63d4d

Fixes #6324
Fixes #5820
2015-11-30 13:11:02 +01:00
Denis Ledoux 93d4db9d1e [FIX] product: resized variant images
This is possible to set an image for a specific variant
When this was the case, the image displayed was always the
image within its original size, it wasn't resized
to small and medium sizes.

opw-657055
2015-11-30 13:06:16 +01:00
Goffin Simon 28463d0310 [FIX] delivery, stock_account: invoice on delivery with fiscal position
When creating an invoice on delivery, the right 'account_id' was not
set on the invoice line according to the fiscal position.

opw:657542
2015-11-30 09:46:38 +01:00
Odoo Translation Bot b8dfa91613 [I18N] Update translation terms from Transifex 2015-11-29 02:58:05 +01:00
Nicolas Lempereur da2e4c86a4 [IMP] account: replace selection key in reconciliation
opw-653468

ff note: no need after saas-6
2015-11-27 17:49:21 +01:00
Denis Ledoux 261ccf7c56 [FIX] point_of_sale: quantity uses decimal separator of lang
This revision is related to 5a10903e9b.

The above revision makes so the decimal separator from the language
is used to display the prices.

This revision makes so this decimal separator is used as well
for quantities, to be coherent.

opw-657591
2015-11-27 17:26:31 +01:00
Denis Ledoux 4b003afd0a [FIX] point_of_sale: quantity decimals for new lines
In the pos interface,
when adding a product to the order,
the quantity was set to `1`,
but, when adding the same product again,
the quantity was set to `2.000`.

We use `set_quantity` to not
copy/paste what is already done
in this method to display
correctly the quantity within
the product unit of measure rounding.
2015-11-27 16:55:00 +01:00
Invitu 52d2b7fbcf [FIX] auth_signup: translate password reset email
The password reset email is in the language of the user clicking on the button,
not in the one of the targeted user.

Fixes #9194
Closes ##9195
2015-11-27 15:02:54 +01:00
Invitu 837ef01c85 [CLA] add corporate signature for Invitu 2015-11-27 14:58:00 +01:00
Denis Ledoux 03ec39d36b [FIX] models: custom models must add the table/column in database
This revision is related to 1b8c9aed9f

As `manual` is now the default value of the `state`,
if `state` is not given in the values when passed to
`create` or `write` of `ir.model` and `ir.model.fields`,
we must assume the value is `manual`, so the columns and tables
are instanciated in database

opw-657750
2015-11-27 13:58:28 +01:00
Olivier Dony 5b60c30a6a [FIX] l10n_eu_service: no reset of install wizard state
Hardcoding the state to `open` is useless as it is the
default state, and forces the state to reset upon every
update, which is annoying.
2015-11-26 18:15:47 +01:00
Denis Ledoux 12f77fa22f [FIX] mail: notify all partners of the thread
As stated in the comment:
```
all notified_partner_ids of the mail.message
have to be notified for the parented messages
```

Record rules are applied when browsing one2many fields.
Therefore, when browsing `message.notified_partner_ids`
with a user other than the SUPERUSER, the multi-company
rules are applied, and a regular user could therefore not see
all partners of the thread, according to which
company the partners are associated with.
Nevertheless, all partners of the thread have to be notified,
including the ones the regular user cannot see.

To reproduce the issue:
 - Create a second company 'Second company'
 - Create a third user, associated to the first company 'YourCompany'
 - Set the demo user as in the 'Second company'
 - Create a project 'test' in the first company, 'YourCompany'
 - In the followers of the project, add the Demo user,
   with as subtypes "Stages changes" only
 - As the third user, create a new task in this project
 - Change the stage of this task, as the third user [this is important]
 - Sign in as the demo user, and see that you cannot access
   your messages inbox, due to an access rights error.

opw-650563
2015-11-26 18:08:07 +01:00
Xavier, Sodexis 70847ac5c0 [FIX] account_analytic_default: Default analytic account for invoice on delivery
When creating an invoice from a DO,
if there is no analytical account defined on the SO,
then use the default analytical account for that product.

Closes #9725
opw-657492
2015-11-26 16:34:02 +01:00
Denis Ledoux 1b8c9aed9f [FIX] models: custom fields seen as base fields
This was possible to create custom fields `x_*`
but seen as base fields.

For instance,
 - Go to Settings > Technical > Database Structure > Fields
 - Select a field (any)
 - Click on the model link, to be redirected to the model form
 - Edit & add a custom field from there.
 - Save
 - Notice that the field you just added is saved as a base field.

We solve this issue by assuming that all created fields and models
are customs, except the ones created by the ORM, by the database
initialization, the fields coming from the modules in python.

We therefore remove the mechanism on which a field was set
as custom according to the fact `manual` was set to True within
the context: This is now the case by default.

No change was required for the base fields: The `state` `base`
was already forced for those fields, that are created using
direct SQL requests `INSERT INTO`.

opw-657312
2015-11-26 15:44:29 +01:00
Denis Ledoux da667b573d [FIX] stock: barcode interface, do not reload locations all the time
Locations were search & read each time you changed
the quantity of a product in a picking.

Once the locations loaded the firs time, this is unlikely
the locations will change during the operation. It shoudln't,
at least.

Therefore, for performances, we avoid to load the locations
each time the picking is reloaded.

opw-648529
Fixes #8344
2015-11-26 14:08:44 +01:00
Denis Ledoux adf6d0e557 [FIX] sale_layout: remove `categ_sequence` default value.
`categ_sequence` are stored related fields, to `sale_layout_cat_id.sequence`.
Setting a default value for them has as side effect to rewrite
the value on the related field.

To reproduce the issue:
 - Create a sale layout category, with 10 as sequence
 - Create an invoice with one line, with this sale layout category
 - Come back to the sale layout category,
   notice that the sequence has been changed to 0.

Besides, as the sequence was rewritten on the sale layout category,
the sequence was rewritten on all sale order lines and invoice lines
having this sale layout category.
If you have a bunch of them, this could take a while.

The `categ_sequence` default value is supposed
to come from the sale layout category.

opw-651937
2015-11-26 11:22:48 +01:00
Christophe Simonis 78ea8eb058 [FIX] core: correcly handle pidfile deletion.
As atexit function are inherited by subprocess, the pidfile was always
deleted when the first worker (http or cron) died. Now, only the
process that created the pidfile will delete it.
2015-11-26 10:40:59 +01:00
Cedric Snauwaert d179a94da6 [FIX] web: list_view, context when doing name_get call in m2m was not compute correctly
this is a backport of commit fd56268c6ca4e8a6f94f16de9129bd12be87303f
2015-11-26 10:25:15 +01:00
Denis Ledoux b459c4dc03 [FIX] website: possibility to set no url for the home menu
Unsetting the URL of the menu `Home`,
in Settings > Configuration > Website Settings > Configure Website,
leaded to the unavailability of the website.

opw-657572
2015-11-26 10:02:41 +01:00
Martin Trigaux 5c0fd9780e [FIX] calendar: duplicated term 2015-11-26 09:52:42 +01:00
Nicolas Martinelli bb90e55fb5 [FIX] product_visible_discount: corrected price
This applies the commits 503820a and f26b94fd (and their subsequent
corrections) to the calculation of the discount. Indeed, the calculation
of the discount must take into account the corrected price, otherwise
the discount is wrongly computed.

opw-656604
2015-11-25 16:00:13 +01:00
Martin Trigaux 1c5c255186 [FIX] calendar: translatable date content
The time_display is present in a translatable email template but was not
translated. Added the missing term.

Updated .pot file for a few missing terms.
Removed base_calendar.pot that has no reason to be in 8.0

Fixes #9573
2015-11-25 14:36:55 +01:00