Commit Graph
107816 Commits
Author SHA1 Message Date
Nicolas Martinelli 65cd9269b4 [FIX] sale: invoice status
- Create a product invoiced at delivery (A)
- Create a SO with Product A, confirm => the invoicing status is
  "Nothing to invoice"
- Create a down payment => the invoicing status is "To Invoice"

Since the down payment is added as a product, its invoicing status
influences the global invoicing status of the SO, while it shouldn't.

opw-727936
2017-04-12 11:08:40 +02:00
Goffin Simon c5f2200a76 [FIX] website_sale: _cart_update
The price of the product was not updated according to the pricelist
when changing the qty of a product in the cart because the context
of the product was not correctly set before calling function
_get_display_price in _cart_update.

But this part of code seems to be redundant with _website_product_id_change.

opw:728312
2017-04-12 10:20:41 +02:00
Nicolas Martinelli eb9b888c5a [FIX] point_of_sale: empty picking
- Create 2 stockable products (A & B).
- Sell these products in the POS, but leave the qty of Product A to
  zero.
- Validate and pay
- In the backend, return the products and register payment

Two pickings are created, and one of them is empty.

Products with a quantity of zero are not included in a picking.
Therefore, we should ignore them when the pickings are created.

Fixes #16292
opw-728101
2017-04-12 09:33:01 +02:00
Goffin Simon cfb06c83e0 [FIX] base: preview_rml_report
Typo error

opw:728334
2017-04-12 09:19:25 +02:00
Raphael Collet 4f98311623 [FIX] fields: recompute recursive stored fields
This is a backport of rev 3481f0faff.
2017-04-12 09:18:23 +02:00
Raphael Collet 3481f0faff [FIX] fields: recompute recursive stored fields 2017-04-11 15:34:34 +02:00
Wolfgang Taferner 46e10baeac [FIX] point of sale: readonly attributes incomplete
We do not want to allow the change of a related config via a pos.order
and in case the pos.order is done or invoiced we should not be able to
change the user_id anymore and the fiscal position should never ever be
changed after the order is not in draft anymore.
User editable introduced at dca370d7.

Closes #16372
2017-04-11 15:09:14 +02:00
Goffin Simon a0fed3b845 [FIX] sale: _compute_analytic with amount=0
Steps to reproduce:
-Create a product P  with a standard price = 0 and its internal category
is in perpetual valuation
-Create a SO with an analytic account and a line with one product P
-Confirm the SO
-Create and validate the invoice

Bug: The delivered qty on the SO was equal to 2 instead of 1 because two
analytic lines are created by function create_analytic_lines with amount=0.
So in function _compute_analytic, the domain was [('so_line', 'in', self.ids), ('amount', '<=', 0.0)]
and it summed the two analytic lines for these two lines. Now analytic lines with amount=0 and linked
to a move line are summed if the they are linked to entries for an account of type "Expenses"(user_type_id).

opw:727302
2017-04-11 15:00:14 +02:00
Yannick Tivisse bbc361d389 [FIX] sale: Use the shipping partner in tax computation 2017-04-11 14:38:01 +02:00
Goffin Simon 1dc361704e [FIX] account: Making a refund with modified taxes
Step to reproduce the bug:
1.Create a product with a customer tax(15%) for a price=100
2.Create a customer invoice with this product
3.Change the amount of the tax to 10(instead of 15)
4.Validate the invoice
5.Click on "Refund invoice"
6.Select the refund method "Modify: create refund, reconcile
and create a new draft invoice"

Bug the new draft invoice has 15 as amount of tax

Now all the taxes from the invoice when preparing the refund in function
_prepare_refund, in this it keeps all the modified taxes.

opw:726491
2017-04-11 14:15:39 +02:00
Nicolas Martinelli 8c326c5cc5 [FIX] stock: reordering rules of archived products
When the scheduler is run, the reordering rules of archived products are
selected.

opw-728316
2017-04-11 13:19:44 +02:00
Nicolas Martinelli b1ba17deab [FIX] stock: reordering rules of archived products
When the scheduler is run, the reordering rules of archived products are
selected.

opw-728316
2017-04-11 13:18:29 +02:00
Fabien Meghazi 68a9a4ce54 [FIX] portal: fix regression of API migration in the portal wizard
Before the migration, send_mail() used to be called with an untainted
context but after the API migration it inherited the altered context
with active_test=False which caused subsequent calls to
ir.mail_server#connect() to fetch inactive records.
2017-04-11 12:28:34 +02:00
Adrien Peiffer (ACSONE) 3a88f7826b [REF] hr_expense: inheritance on move line preparation values
Closes #16351
opw-728271
2017-04-11 10:46:57 +02:00
Nicolas Martinelli c9c110d088 [FIX] payment_authorize: no partner email
When no email is defiend on the partner, a traceback is raised when
paying with Authorize.net.

The `text` attribute requires a string, not a boolean (`False` in this
case).

opw-728301
2017-04-11 10:43:09 +02:00
Odoo Translation Bot 69b45530dc [I18N] Update translation terms from Transifex 2017-04-11 10:37:54 +02:00
SEINLET Nicolas ded636eae1 [FIX] ir.rule: use rules at most once (#15843)
When a user belongs to multiple groups, and an ir.rule is applicable for some of
them, the rule is added multiple times in the domain. Just do it once. This
makes the query shorter and easier to debug.
2017-04-11 09:27:58 +02:00
Nicolas Martinelli 1d29649e57 [FIX] account_tax_cash_basis: zero line
- Create a new account of type "Expenses". Allow the reconciliation and
  assign this account on the internal category of a product on both
  "Expense account", "Stock Input" and "Stock Output".
- Create a fiscal position to get the following tax behavior: apply two
  taxes of the same amount but with opposite sign (+ 21% on the one
  side; - 21% on the other side). Activate the tax cash basis feature on
  these taxes. It should give, on the same FP:
  Tax 21% -> Tax 21%
  Tax 21% -> Tax -21%
- Create a journal for the tax cash basis, set it in the company
  settings.
- Create a PO (with the previously created FP) for several products
  belonging to the same internal category and receive the products. Each
  line generates an entry recorded in the stock journal. The expense
  account is used in those entries.
- Create the supplier invoice for the PO and validate which also
  generates a journal entry with as many line on the expense account as
  there are some products on the invoice.
- In the journal items, reconcile the expenses accounts entries
  generated by the stock input and the supplier invoice.

It triggers a lot of lines on this expense account for 0 each.

opw-726120
2017-04-11 09:00:38 +02:00
Alexis de Lattre 91470a37fe [FIX] account: traceback on mass reconciliation of payments and invoices
Fix Bug #14866. Was PR #16149. Courtesy of Alexis de Lattre (Akretion)
2017-04-11 08:51:06 +02:00
Christophe Simonis 2c897d4199 [FIX] base: allow users to delete own filters, even if not creator 2017-04-10 15:17:49 +02:00
Pierre Masereel 57baccb14a [FIX] maintenance: scheduled maintenance request
When we set a period for preventive maintenance on an equipment which
has no maintenance team set, the cron cannot create the maintenance
requests.

To fix this issue, the maintenance team is now required when a period is
set on an equipment.
2017-04-10 14:54:53 +02:00
Nicolas Martinelli 0b7b5650f1 [FIX] purchase: select supplier
Complement of previous commit, allows to retrieve procurement in the
method as well.
2017-04-10 13:13:22 +02:00
Tran Thanh Phuc 6108778497 [FIX] point_of_sale: wrong group by
Both group by filters are the same
Closes #16338
2017-04-10 12:07:00 +02:00
Tran Thanh Phuc 8600ae34df [CLA] signature for ttpphuctran
Done at #16337
2017-04-10 11:51:43 +02:00
Nicolas Martinelli a07447e85a [FIX] purchase: select supplier
When a PO is created through the resolution of a procurement, the first
supplier of the list is automatically chosen. This is hardcoded and
cannot be extended.

We add a hook so it's possible to customize the selection of the
supplier, for example by selecting the one who offers the best price.

opw-726309
2017-04-10 11:12:48 +02:00
Florent de Labarre aefd8813b9 [FIX] report: check error codes for big pdf files
Closes #16060
2017-04-10 09:43:42 +02:00
Odoo Translation Bot 8f7791fcee [I18N] Update translation terms from Transifex 2017-04-09 02:54:13 +02:00
Odoo Translation Bot 086723152e [I18N] Update translation terms from Transifex 2017-04-09 00:30:47 +02:00
qsm-odoo 4aab300070 [FIX] web_editor: allow to save unchanged icons with media dialog
There was a bug with the icon edition when following these steps:
- Open the Media dialog to edit an existing icon
- Hit the "save" button in the dialog without choosing the icon
- The edited icon disappears

This happenned for icons whose original values were aliases of the
related icon. Indeed, following these steps to edit an "fa-facebook-f"
was leaving the icon unchanged as expected but doing it for a
"fa-facebook" icon made the icon disappeared. This is because the
last one is an alias of the first one and that the media dialog was
ignoring aliasies when saving the original value.

opw-725813
2017-04-07 17:46:07 +02:00
Christophe Simonis aea68e4730 [MERGE] forward port branch 9.0 up to 51fe54dd8d 2017-04-07 17:34:51 +02:00
Pierre Masereel 8d65763f93 [FIX] stock: MTO move status
When we validate a SO with an MTO product, then an RFQ and a delivery
picking are created. The status of the delivery picking is in state
'confirmed', but should be 'waiting' as the delivery waits for a
specific delivery input.

The problem is caused by the unreserve method, which is called in the
'procurement_jit' module. This method only checks that a move has
ancestors to determine if the move should be in waiting or in confirmed,
which is not the case for our delivery move because the RFQ has not been
validated yet so there is not ancestors yet.

To fix this issue, we check the 'procure_method' of the move, and if it
is in 'make_to_order' we put it in 'waiting' instead of 'confirmed'.

We also fixed the function recalculate_move_state that could cause the
same problem.
2017-04-07 16:35:57 +02:00
Christophe Simonis 51fe54dd8d [MERGE] forward port branch saas-6 up to d92c048f9a 2017-04-07 16:30:03 +02:00
Yannick Tivisse a3778ceada [FIX] account,sale: Select correclty the delivery partner
To deduct the fiscal position, we should use the shipping partner.

The field `partner_shipping_id` is defined in the sale module.

Thus, we should choose this partner if the module sale is installed and if this field is set, or fallback to the original partner instead
2017-04-07 16:17:49 +02:00
Christophe Simonis d92c048f9a [MERGE] forward port branch 8.0 up to 6595cfdf0c 2017-04-07 16:16:03 +02:00
Jérome Maes b99311b0e9 [FIX] mass_mailing: use correct regex to detect href content
link_tracker use a regex to determine the content of
a 'href' tag, taking the 'mailto:xxxx@yyyy.zz' case
into account. mass_mailing use another regex that simply
don't.
So when sending a mass mailing containing email link,
the email will be appended by url path of tracking
url '/m/<stat_id>'.

This commit makes mass_mailing use the same regex as
link_tracker (which is in the dependencies of mass_mailing).

opw-727779
2017-04-07 15:52:13 +02:00
jaredkipe cf81b665e5 [FIX] hr_timesheet_attendance: convert field type
Bad migration of new API, was a float field.
Probably introduced at 510d260

Closes #16290
2017-04-07 15:12:22 +02:00
Christophe Simonis d4d5181285 [MERGE] forward port branch saas-6 up to 271067f50c 2017-04-07 15:11:50 +02:00
Nicolas Martinelli 606712a5d2 [FIX] web: refuse DB name with space
In v8, it was not allowed to create a DB with a name containing a space.
This should still be the case from v9 since it causes issuesfor backup
scripts, for example.

Reintroduces 1a0e9063d4

opw-727613
2017-04-07 14:53:01 +02:00
Yannick Tivisse 1452a9903c [FIX] account: Use the invoice shipping address to select the fiscal position
Tribute to Ray Carnes

PURPOSE
=======

Since the fields shipping_partner_id has been added on the invoice model, the onchange triggered by the partner_id hasn't been modified.

SPECIFICATION
=============

The shipping_partner_id will be picked by default to select the fiscal position. If there's no shipping partner, it will check if a 'shipping' partner is a child on the partner_id.
2017-04-07 14:33:02 +02:00
Miku Laitinen b3c949b0c5 [FIX] doc: migration from community to enterprise
In the beginning Odoo Enterprise addons contained a second web module. At some
point that was replaced with web_enterprise, but the documentation wasn't
updated.

Describe the proper changes.

Closes #16302
2017-04-07 14:00:25 +02:00
Fabien Meghazi a859c3b6b3 [REM] Remove 'state' group_by filter in purchase order line search view (opw: 727796)
The group by on state in this search view cannot be used due to a typo
in the 'state' field's attribute "stored=True" dbe3d8035f

It can't be fixed in 9.0 as it would change the schema, hence the only
option is to disable this filter in 9.0

This should not to be forward ported to 10.0 as it is already fixed for
this version in 3451ac5254
2017-04-07 13:17:36 +02:00
Joren Van Onder d17c302c0a [FIX] point_of_sale: undo mobile browser autoscroll in client list
Mobile browsers attempt to scroll invisible input elements into
view (eg. when they end up hidden behind the on-screen keyboard). The
browser does not always correctly undo this. This is problematic
because the main window in the client list is not actually scrollable
for the user, so you ended up with part of the widget cut off. This
implements a workaround that scrolls to top when input elements are
blurred. Removing the blur handlers is not necessary because the input
elements get removed.

opw-706781
2017-04-06 17:01:22 -07:00
Goffin Simon c8a434306f [FIX] website_sale: Updating price on Optional Products
When changing the quantity of a product in Optional Products modal
in the shop, the price was not updated according to the pricelist.

opw:726686
2017-04-06 17:37:19 +02:00
Goffin Simon 428d9e8177 [FIX] odoo: Copy a record in other language than US
When copying a record in an other language L than US, first a translation
was created for L by the create called in the copy function and afterwards,
a second translation was created by the function copy_translations

So there were two duplicated translations for L instead of one.

opw:706865
2017-04-06 17:13:15 +02:00
Raphael Collet 6595cfdf0c [FIX] expression: avoid useless query when searching on x2many sub-field
Searching on a domain like `[('m2m.sub', operator, value)]` currently does
something like:

    right_ids = comodel.search([('sub', operator, value)]).ids
    table_ids = model.search([('m2m', 'in', right_ids)]).ids

and reduces the domain triple to `('id', 'in', table_ids)`.

The domain triple can actually be reduced to `('m2m', 'in', right_ids)`.  With
this reduction, the search on the field `m2m` will be done as part of the main
query.  And this will also enable the optimization of the former fix!
2017-04-06 16:46:46 +02:00
Raphael Collet 5219dcbae3 [FIX] base: malformed base.pot 2017-04-06 16:30:29 +02:00
Raphael Collet 3c2065c89d [FIX] expression: use sub-select when searching on many2many field
Avoid pathological performance issue caused by injecting ids retrieved with
another query.

Consider a domain like `[('m2m', 'in', ids)]` on a many2many field.  The
current implementation will perform the subquery:

    SELECT m2m_id1 FROM m2m_table WHERE m2m_id2 IN (ids)

and inject its result into the main query as:

    SELECT id FROM ... WHERE id IN (result_ids)

The latter may be very slow if `result_ids` is a huge list of ids.

The fix injects the first query into the main query as:

    SELECT id FROM ... WHERE id IN (
        SELECT m2m_id1 FROM m2m_table WHERE m2m_id2 IN (ids)
    )

As a result, the database will typically JOIN both tables, and avoid generating
the whole list from the subquery.
2017-04-06 15:59:50 +02:00
Thomas Binsfeld 01add1fe15 [FIX] account: browse only one record
Part of #16282
2017-04-06 15:11:31 +02:00
Raphael Collet 6621ade382 [FIX] ir_model: prevent renaming/removing fields that are used in views 2017-04-06 15:06:06 +02:00
Raphael Collet 5a1672fab8 [FIX] ir_model: field names must be unique per model 2017-04-06 15:05:52 +02:00