Commit Graph
103218 Commits
Author SHA1 Message Date
Goffin Simon 75534d358c [FIX] 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

opw:656501
2015-11-26 16:41:24 +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
qsm-odoo bbc67ec402 [FIX] web: export data according to domain
Some accounting model (i.e. account.tax) are redefining the ORM search
method, but with misordered arguments (placing count as fifth argument
instead of context).

For the export function, this lead to have the "context" variable
associated to the "count" function variable. As "count" is then
considered as True, the method returns the number of records instead
of the list of record ids. This then exported the last record (the
count'th one) instead of all the records that matched the domain.

The solution here is to explicitly give the context variable by name.
2015-11-26 15:57:17 +01:00
Nicolas Martinelli 53cb608b17 [FIX] purchase: missing string
Even if the field is used for technical purpose only, it is still better
to define a string for the translation.
2015-11-26 15:46:37 +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 8be7eed9ca [FIX] sale, portal_sale: hide buttons for portal users
When a portal user opened his quotation form,
all buttons of the regular form were available.

They were not working, due the access rights,
but it's better to hide them.

opw-657654
2015-11-26 15:38:08 +01:00
Nicolas Martinelli 86015ac1c5 [FIX] purchase: add missing drop ship address
The drop ship address was missing from the view, making impossible to
specify the address where the products needed to be delivered.

The fix adds the missing field to the view, and make it visible (and
required) if the delivery must be done at a customer location.

opw-657054
2015-11-26 15:16:59 +01:00
Martin Trigaux dd8052a7ce [I18N] website_forum: reexport source terms
Remove incorrect term from calendar and add missing sentence
2015-11-26 15:12:31 +01:00
Nicolas Lempereur 971ea77a44 [FIX] website_forum: typo, entity need double escaping 2015-11-26 15:05:04 +01:00
Denis Ledoux 8c29e7f17a [FIX] sale: Sales filter
The filter `Sales` in the sales orders search views
was defined as
`[('state','in',('progress','Done'))]`
but
 - progress no longer exists. It's `sale` now.
 - `Done` is the label, `done` is the value

opw-657552
2015-11-26 15:02:00 +01:00
Géry Debongnie 7137891a8a [FIX] mail, im_livechat: correctly displayed message date
Messages are required to be displayed in a smarter way: relative to the
current date, if it's a recent message, or absolute if not.  This
commits rework most of the date processing code to comply with these
requirements.

Messages were preprocessed each time a thread is rendered, which is
stupid.  It should be preprocessed only when the message is created.
This was a small problem because livechat does not use the chat manager,
so a simplified version of the preprocessing had to be done.
2015-11-26 14:27:11 +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
Nicolas Martinelli bef0da3a7a [FIX] account: Total Receivable and Payable
The fields Total Receivable and Payable are calculated as debit-credit.
However, this leads to a wrong computation if, for example, a payment is
used to pay several invoices. For example:
- Create a customer invoice of 2500 USD
- Register a payment of 3000 USD
The Total Receivable will be 3000 USD instead of 500 USD.

At the same time, this commits changes the sign of the field. The help
depicts the Total Receivable field as "Total amount this customer owes
you". Therefore, one would expect that if the customer owes 250 USD, the
Total Receivable is 250 USD, not -250 USD.

The same logic applies to Total Payable.

opw-657053
2015-11-26 12:19:41 +01:00
Denis Ledoux b27fc372f4 [MERGE] forward port of branch 8.0 up to adf6d0e 2015-11-26 11:24:15 +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
Géry Debongnie 5b82c9ccb4 [FIX] mail: better heuristic for displaying origin channel 2015-11-26 10:25:44 +01:00
Géry Debongnie a98db07384 [FIX] mail: fix various search-related problems
This commit tries to correctly use messages from the cache instead of all
messages.  This means that we need to correctly add messages to the
domain-specific caches, and correctly invalidate them when necessary.

Also, to avoid increasing the algorithmical complexity of the process,
particular care was made to avoid scanning too many lists.  For example,
the channel caches have now a messages field, instead of message_ids.
2015-11-26 10:25:44 +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 fd56268c6c
2015-11-26 10:25:15 +01:00
Martin Trigaux 001e558178 [FIX] calendar: do not forwardport .pot content 2015-11-26 10:09:51 +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
Nicolas Martinelli 2f0135c820 [FIX] product: resets fields
applied_on:

The field applied_on in pricelist rules is not taken into account:
- In the price computation
- In the name computation

When creating a pricelist item, if you select (applied_on = Product)
first and set a product, then select (applied_on = Global), and save the
rule, the computation will still take the product_tmpl_id in the price
computation.

Instead of fixing the whole _price_rule_get_multi method, this patch
sets the fields that should not be taken into account to False.

compute_price:

Add a behavior similar to the applied_on field, to reset unnecessary
fields to zero when the computation method is changed.

Original idea from @tgr-odoo

opw-657148
Closes #9671
2015-11-26 09:57:55 +01:00
Martin Trigaux 5c0fd9780e [FIX] calendar: duplicated term 2015-11-26 09:52:42 +01:00
Cedric Snauwaert fd56268c6c [FIX] web: list_view, context when doing name_get call in m2m was not compute correctly 2015-11-26 09:43:21 +01:00
Christophe Simonis 32c7c31b40 [MERGE] forward port of branch saas-6 up to a73e292 2015-11-25 19:08:27 +01:00
Christophe Simonis a73e29255d [MERGE] forward port of branch 8.0 up to 1c5c255 2015-11-25 18:59:05 +01:00
Damien Bouvy 414c567dd1 [FIX] web_settings_dashboard: merge apps & enterprise panels
- Makes the panel less obtrusive and does not disrupt the
layout of the dashboard anymore.
- Use the global version info to save an extra RPC call.
2015-11-25 18:13:01 +01:00
Damien Bouvy 111b3838dc [FIX] mail: store expiration data w/ correct group 2015-11-25 18:13:01 +01:00
Damien Bouvy eee26f4454 [FIX] base: expiration date does not belong in the community edition
The expiration date will now be set when installing the enterprise
'web' module instead of at the init of the database since putting
an expiration date on a community edition database doesn't make sense.
2015-11-25 18:13:01 +01:00
Damien Bouvy 0a6edac151 [FIX] web, openerp: make the webclient edition aware
- Differentiate between the Community and Enterprise editions
in the version number. By adding this attribute on the global
odoo JS object in the web client bootstrap controller /web,
we can differentiate between versions easily on the client
side without extra RPC calls.

- Remove a couple of version-related RPC calls in case
the global version info is present in the JS environment

- Update "About" panel to display the edition info

- This commit also reverts 07fe5afc87
which implemented the idea in a more limited way.

Closes #9625
2015-11-25 18:12:42 +01:00
Martin Trigaux e8e5405d0c [I18N] Update French translation terms from Transifex
Fixes #9712
2015-11-25 17:22:26 +01:00
David Monjoie bc0521805a [FIX] hr_holidays: consistent leave allocations create
This window action did not open the create form
view as a leave allocation but as a leave request,
which was inconsistent with the very similar
open_allocation_holidays action. With the former,
the duration field was two dates. On the latter,
it was only a number of days, as it should be for
leaves allocations.
2015-11-25 16:56:05 +01:00
Aaron Bohy 0413cc9641 [FIX] web: display pager in SelectCreateDialog 2015-11-25 16:23:44 +01:00
Nicolas Martinelli 4d8ddabe63 [FIX] purchase: keep track of all procurements
Keep track of all the procurements in the field "Source Document" of the
PO.

opw-654424
2015-11-25 16:10:40 +01:00
Nicolas Martinelli 39f8b5aff7 [FIX] stock: error if not assigned
When the user validates a picking without going through the manual
reservation process, Odoo tries to assign the picking then performs the
transfer. However, if the picking could not be assigned, no pack
operation is created and the picking will simply be set to done.

The fix raises an error if the picking could not be assigned completely.
Another solution is to use a force_assign instead of action_assign, but
that could lead to the creation of negative stock moves without warning
the user. We therefore prefer to stay on the safe side and force the
user to manually handle the reservation.

Note: the original issue was that the Owner of the picking was not
copied on the quant when validating right away. The reason was that no
pack operation was created.

opw-654423
2015-11-25 16:09:16 +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
Darshan Kalola 1b714bdc6c [FIX] point_of_sale: fix 'Group of Taxes' calculation
There were still references in the POS to a child_ids field on
account.tax. This field was renamed in accounting v9 to
children_tax_ids. Because child_ids wasn't loaded anymore this meant
that child_ids on the taxes in the POS was always undefined. On top of
that the original code used Array.prototype.concat() assuming it
modified the array, when in fact it returns a new array.

All of this meant that group taxes in the POS were never calculated,
this resolves that.
2015-11-25 15:34:28 +01:00
Joren Van Onder b32355e9b7 [FIX] point_of_sale: fix forward port of currency displaying
This fixes the forward port of 5c9b4556e3
from saas-6, which was forward ported to 9.0 in
56a442e205.
2015-11-25 15:13:16 +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
Denis Ledoux 2fd14db574 [FIX] stock: multi-company rule for stock.quant.
`stock.move` & `stock.product` have multi-company rules.
There is therefore no reason why `stock.quant` could not have one.

Besides, this could lead to access rights issues,
when a user went to the `Quants` list,
in Warehouse > Traceability > Quants,
while there were quants for products in a company different
than the user company.

opw-653188
2015-11-25 14:32:46 +01:00
Goffin Simon b2939537d9 [FIX] website_quote: using a quotation template with a fiscal position
When creating a SO with a quotation template, the lines created
with the quotation template must take into account the fiscal position
set on the SO to compute the right taxes.

opw:657015
2015-11-25 14:31:22 +01:00
Martin Trigaux 1660daf2fb [FIX] crm: avoid constraint errors when merging partners
As for the _update_foreign_keys, the _update_reference_fields method may raise an unique constraint when merging two partners.
In such case, the new record is not relevant and can be removed.

Backport of 8d23a3a86c.
OPW 657338, closes #9705.
2015-11-25 14:15:25 +01:00
Christophe Simonis 83f56a30a6 [FIX] website_sale: declare js function in the right module 2015-11-25 13:59:07 +01:00
Christophe Simonis 56a442e205 [MERGE] forward port of branch saas-6 up to dade7e3 2015-11-25 13:26:02 +01:00
Nicolas Lempereur 8d3bdf6b50 [FIX] project: IE11 issue with kanban overflow
In 6fd7fc9 the issue was solved in some instance, but there was still an
issue with the combination of IE11 / Odoo community / Overflowing content.

fixes #9696

related to opw-653477
2015-11-25 12:40:47 +01:00
Denis Ledoux dade7e3c17 [FIX] website_quote: confirmation email at payment.
`website_quote` overrides `payment.transaction`.`form_feedback`
the same way `website_sale` does,
in case `website_quote` is installed without `website_sale`.

Therefore, the revisions
 - 4adb4b8
 - 809e1a6

must be applied there as well.

opw-657432
2015-11-25 11:22:44 +01:00
Christophe Simonis 12d5b4168f [MERGE] forward port of branch 8.0 up to 8e1a5ad 2015-11-25 11:18:21 +01:00
Cedric Snauwaert d31b1ab2a7 [FIX] account: amount_residual_signed should be negative for refunds only 2015-11-25 11:02:32 +01:00
Nicolas Lempereur f5bd1cc922 [FIX] web: local var parent typo
fixes #8516

note: was already solved in enterprise with 7ab5075
2015-11-25 11:00:52 +01:00
Goffin Simon 15ff26c9f7 [FIX] website_quote: onchange_template_id
If a quotation template was used to create a SO, the default customer
taxes set on the product's line were not set on the SO lines.

opw:657015
2015-11-25 10:14:34 +01:00