Commit Graph
111887 Commits
Author SHA1 Message Date
Pratima Gupta 8b2e0fcc5a [IMP] stock: Show the negative stock in red in inventory 2017-09-15 15:38:37 +02:00
Pierre Masereel ab31d43fb9 [FIX] stock: stock user create lot
When a stock user want to create a lot an exception is raised saying
that he cannot modify a product.

This is caused by the field 'product_uom_id' on the model
'stock.production.lot' that is a related to 'product.product' and not
set as readonly in the 'stock.production.lot' view.

So by setting it as readonly, we don't set the uom to the server, and so
don't try to re-write it on the product
2017-09-15 14:51:03 +02:00
Nhomar Hernández [Vauxoo] b1368d56be [FIX] base_vat: Regex need 'br' insted only 'r' now on python3 2017-09-15 14:24:30 +02:00
Pierre Masereel 470577c129 [CLEAN] stock: remove unused methods since stock refactoring 2017-09-15 12:00:40 +02:00
Pierre Masereel 62c6d6fc81 [FIX] stock: move_view without suggest
The move line view when the option no suggest is checked doesn't work
because it hasen't been adapted during the refactoring of stock module.

So to avoid having differences between the view in no suggest and in
suggest, we use the same tree view that we reference. Because the views
shouldn't be different if we are either in suggest or no suggest
2017-09-15 11:48:11 +02:00
Pierre Masereel b9be8402c3 [FIX] core: handle sql constraint exceptions in python3 2017-09-15 10:18:32 +02:00
Christophe Simonis a63a805efb [FIX] core: python3 compat: do not modify dict during iteration 2017-09-14 19:41:13 +02:00
Xavier Morel 359d91e94a [FIX] website_form: custom field thing blows up in P3
Custory reading seems to denote that field names are probably already
text in the normal case, and thus should not need decoding? It only
blows up in a tour so...
2017-09-14 15:41:13 +02:00
Christophe Simonis 4bcd444eae [FIX] core: python3 compatibility for migration engine 2017-09-14 14:09:29 +02:00
Pierre Masereel 858cb6534b [FIX] stock: barckorder on move with mulitple move_line
When a move is set to done and a backorder should be create, we get a
traceback saying that we cannot set the quantity done on a move with
multiple move move_lines.

This occurs, when the stock move has multiple move lines with quantity
done set to 0;

Because the new move only contains move lines having quantity done 0, we
remove the useless line that set the quantity done on the move
2017-09-14 11:25:26 +02:00
Xavier Morel 4a878fa4dc [FIX] P3: metadata update
* gitignore pycache folders (apparently appear for some)
* update xlwt requirement: 1.1.2 does not work with Python 3.6, 1.2 should work, 1.3 officially supports it
2017-09-14 10:18:06 +02:00
Christophe Simonis 1e17035f71 [MERGE] forward port branch saas-16 up to 268cf9d04a 2017-09-13 19:32:35 +02:00
Christophe Simonis 268cf9d04a [MERGE] forward port branch saas-15 up to 127dea7f66 2017-09-13 18:45:07 +02:00
Christophe Simonis 127dea7f66 [MERGE] forward port branch saas-14 up to 3d2a7a0d12 2017-09-13 18:21:23 +02:00
Christophe Simonis 3d2a7a0d12 [MERGE] forward port branch 10.0 up to 5b69f1a333 2017-09-13 17:48:37 +02:00
Christophe Simonis 5b69f1a333 [FIX] account_tax_python: correctly forward-port 7eb7e9fd6e 2017-09-13 17:47:34 +02:00
amoyaux 0f9302af1f [FIX] stock: recheck availability on mts move bypassing reservation
When running action_assign on a mts move bypassing the reservation,
we always created a new stock move line with the quantity of the move.
This proved to be too naive when running recheck availability.

Exemple: Let’s say I have a reserved move of quantity 5.
If I edit the initial demand to 7 and click on recheck availability,
I end up with a move line of 5 and a move line of 7. We adadapt the
code in a similar way that what’s done in _update_reserved_quantity,
by looking for a candidate move line and only increasing the reserved
quantity by what still needs to be reserved.
2017-09-13 17:30:20 +02:00
Christophe Simonis c8194a7647 [MERGE] forward port branch 10.0 up to c8b5c01340 2017-09-13 16:55:42 +02:00
Christophe Simonis c8b5c01340 [MERGE] forward port branch 9.0 up to 7eb7e9fd6e 2017-09-13 16:49:16 +02:00
Martin Trigaux 052bc38805 [FIX] google_calendar: do not create an event with an invalid id
The id is useful to update existing events but sometimes we are getting some
ids that are not accepted by Google

Getting an error:
odoo.addons.google_account.models.google_service: Bad google request : {
 "error": {
  "errors": [
   {
    "domain": "global",
    "reason": "invalid",
    "message": "Invalid resource id value."
   }
  ],
  "code": 400,
  "message": "Invalid resource id value."
 }
}

Looks like existing events can have a _ in their id but new one, no longer.
It seems that these events are created by outlook calendar when synchronized
with Google Calendar.

opw-749752
opw-751294
opw-751348
2017-09-13 11:23:35 +02:00
Dan Čermák a52369274a [CLA] signature for D4N
Closes #19425
2017-09-13 11:22:00 +02:00
David Arnold cc955698ce [FIX]sale_stock: copy devolution move without decreasing respective SO values
-Make a return picking from a SO, and condigure the items to be refunded on SO(in the wizard)
-Copy the return picking.
-Validate it.

Without this fix, it would just keep decreasing the delivered value on SO.

opw:767429
2017-09-13 11:02:56 +02:00
Goffin Simon 8fbee7978f [FIX] purchase: PO state when validated
When nothing has been invoiced and the PO is validated with nothing to invoice
then the state of the PO must be "Nothing to invoice"

opw:769919
2017-09-13 10:16:34 +02:00
Nicolas Martinelli 7f356d6653 [FIX] account: mark as reconciled
`last_time_entries_checked` is a commercial field, so bypassing the
write won't sync it.

Closes #19274
opw-770018
2017-09-12 18:27:33 +02:00
Nicolas Martinelli 6318ff6675 [FIX] account_voucher: default currency
- Go to Accounting > Configuration > Journals.
- In the form view of a journal, click on Action > Voucher Entries
- Click on Create => traceback

opw-771415
2017-09-12 17:11:14 +02:00
Nicolas Martinelli 39964e6cf2 [FIX] account: mark as reconciled
- Create 2 companies:
- Company A and check VIES VAT Check
- Company B and do not check VIES VAT Check
- Set current company of admin to Company A and do not allow Company B
- Create a demo user on Company B and give him Adviser group in
  Accounting.
- Log in with the demo user.
- Create a Customer A as a company with:
  Country = Spain
  TIN = ES85847955H
- Create a contact on Customer A: "Contact Sample"
- Create a Customer invoice on "Contact Sample" partner
- Through the menu Accounting/Payments, create a new payment on "Contact
  Sample" partner with the total amount of the invoice.
- Open the menu Manual Payments and invoicing matching. The invoice and
  the payment should be proposed for reconciliation. Do CTRL+ENTER.

An error message appears: 'The VAT number [ES85847955H] for partner
[Contact Sample] either failed the VIES VAT validation check or did not
respect the expected format ESA12345674.'

This message should not appear as the current user is on Company B which
doesn't have the flag "VIES VAT Check" checked.

The issue comes from the `sudo` in `mark_as_reconciled`, which will lead
to `self.env.user` to be the admin in the VAT check, and therefore
`self.env.user.company_id` will be Company A.

Closes #19274
opw-770018
2017-09-12 16:24:26 +02:00
Martin Geubelle 917ba745ea [FIX] web, account: display partner in reconciliation
When selecting a partner in the reconciliation widget, using the SelectCreateDialog
(Search More), the partner wasn't correctly displayed.

This was due to a difference between the change format of the many2one ; when using
the dialog, only the `id` is sent (while the `id` and `display_name` are sent when
using the many2one dropdown).

These two behaviours are now standardized and both now send `id` and `display_name`.

It has the advantage of sparing some `name_get`s called by the model because the
`display_name` was missing.

This change implies some refactoring where the SelectCreateDialog was used.
2017-09-12 15:49:22 +02:00
Goffin Simon 94eb69907d [FIX] crm: columns and tables in upper cases
The module studio gives the abality to name columns or tables with
upper cases. So making the SQL case sensitive avoids problems with studio.

opw:770022
2017-09-12 15:37:47 +02:00
Nicolas Martinelli d20388ba1a [FIX] purchase: missing data in tax computation
- Create a purchase tax computed with Python code.
- The Python code must use an attribute of the product, e.g.
  `product.price`.
- Create a PO using the created purchase tax.

It crashes, because the product (as well as the partner) is not sent to
the `compute_all` method.

opw-770078
2017-09-12 12:25:34 +02:00
Christophe Simonis 961b7820de [🐍3] 🎉 2017-09-12 12:15:10 +02:00
Nicolas Martinelli 7eb7e9fd6e [FIX] account_tax_python: empty code
If the user somewhat removes the 'Applicable Code' text, the call to
`safe_eval` will crash.

opw-769267
2017-09-12 12:01:57 +02:00
Wolfgang Taferner 236a24de96 [FIX] account: handling of text domains in _query_get
1df72cb01b added a stringification of
the domain parameter to handle situations where an actual
domain (list/tuple) is being provided rather than a string, however
this causes issues when the string input is text (unicode) containing
non-ascii data as in Python 2 `str()` will then raise a
UnicodeEncodeError.

Rather than stringify the input, bypass safe_eval when the input is
already a proper domain.

Closes #19367
2017-09-12 11:20:09 +02:00
Nicolas Martinelli 80ad2a370c [FIX] account_asset: deferred revenue account
- Associate a product with a "Deferred Revenue Type"
- Create a customer invoice and add the product => the account of the
  deferred revenue is used.
- Create a SO with the same product, and generate the invoice => the
  account of the deferred revenue is NOT used.

opw-769254
2017-09-12 11:06:12 +02:00
Simon Lejeune d08b4407be [REF] stock: _get_available_qty and tracked products
Suppose you have a product tracked by serial number. In your inventory,
you have two quants: -1 for serial1, +1 for serial2.

If you create a move for 1 product and try to run `action_assign`, it
didn't work before this patch because stock.move's
`_update_reserved_quantity` is guarded by a call to
an unstricted `_get_available_quantity` (unstricted meaning considering
all quants regardless of their lot_id/package_id/owner_id). This call
resulted in an available quantity of 0, thus the stock move could not be
reserved

To fix this issue, we patched `_get_available_quantity` so that it
rightly considers products of different lot_id as different products,
i.e. it returns an available quantity of +1 in the initial scenario. Of
course, we consider all quants of the same lot_id, i.e. if you have -1
for serial1 and +1 for serial2, the available quantity amounts to 0.

In another scenario, let's say we have only -1 serial1 in stock, if we
run `_get_available_quantity`, the method should return 0: nothing is
reservable. We continue this reasonment by returning 0 everytime the
available quantity is negative, tracked or not. This is probably what a
method named `_get_available_quantity` should have done since the
beginning.

There's only a single case where we need to know the quantity even if
it's negative: it's just after we move a quant to its destination
location. If this quant was tracked and resulted in a negative quant
(i.e. we moved something we didn't have), we try to compensate with an
untracked quant. In this special case, we do not want to ignore the
negative quants when calling `_get_available_quantity`.  That's why we
introduce a new argument to this method. We could have added a new method
`_get_quantity` for clarity sake.
2017-09-12 10:50:04 +02:00
Joren Van Onder bb8f7bf9c3 [IMP] stock: set default product_id for new lots
When creating them through the Serial/Lot Number stat button on the
product variant.
2017-09-11 18:18:41 -07:00
Pratima Gupta 011d6acbe9 [IMP] account_analytic_default: remove the stat button 'Analytic Rules' 2017-09-11 18:18:41 -07:00
Pratima Gupta 9dadb4c475 [IMP] stock: add tooltip to field show_reserved of stock.picking.type 2017-09-11 18:18:41 -07:00
Pratima Gupta 350f5d5878 [IMP] stock: add stat button for product lot 2017-09-11 18:18:41 -07:00
Pratima Gupta 06c4a707ee [IMP] stock: don't group_by location when clicking on Quantity On Hand 2017-09-11 18:18:35 -07:00
Pratima Gupta 0f7d2d7cf7 [IMP] stock_account: add valuation stat button for products 2017-09-11 11:32:21 -07:00
Pratima Gupta e20ab3637f [IMP] report_intrastat: move report menuitem
to Invoicing -> Reporting -> Business Intelligence
2017-09-11 11:32:21 -07:00
Pratima Gupta a686cbc6e1 [IMP] stock: rename stock_move_action 'Picking Moves' -> 'Stock Moves' 2017-09-11 11:31:45 -07:00
Pratima Gupta c903a29c54 [IMP] stock: take stock_move_line_action menuitem out of debug mode 2017-09-11 11:31:30 -07:00
Pratima Gupta 029e227167 [IMP] stock: improve string for action_view_stock_move_lines
'Inventory Moves' -> 'Product Moves'
2017-09-11 11:24:57 -07:00
Christophe Simonis 73bb71b80c [MERGE] forward port branch saas-16 up to 295a377e5d 2017-09-11 18:56:15 +02:00
Christophe Simonis 295a377e5d [IMP] web: add test to ensure nobody will commit again unwanted QUnit.only 2017-09-11 18:14:16 +02:00
Martin Geubelle 7a87484856 [FIX] web: remove QUnit.only occurence 2017-09-11 16:54:09 +02:00
fwi-odoo 68d1e6d8b1 [FIX] web: evaluate the view context for the subviews not inline
Before this commit, the xml attributes defined with 'context.get(key)' in the
subviews not inline were not evaluated correctly. This was caused
by the loss of the one context in the '_loadSubviews' method.

This commit fixes this issue and modifies the mockserver in order to be able
to use the parameter 'viewOptions.context'.
2017-09-11 16:41:58 +02:00
fwi-odoo 268e6d9530 [FIX] web: calendar: set event without time as all day
Before this commit, when an event had only a date, the event
was set to midnight.
This commit sets the event as all day event if the field used as start date
is only a date and not a datetime.
2017-09-11 16:41:40 +02:00
Cédric Pigeon 280d9986fd [FIX] prevent calling costful methods on empty recordset
Some methods are called on empty recordset causing lacking of performance.

opw:769720
2017-09-11 16:39:35 +02:00