Commit Graph
100552 Commits
Author SHA1 Message Date
Denis Ledoux 6c8bbc3d46 Revert "[FIX] fields: make related_sudo work for draft records (used by onchange)"
This reverts commits
 - 995b257a6c
 - 2ebdb5f36e
 - 748a719fd9.

The commit 748a719fd9 leads to an issue
bigger than what it aims to solve:
 - as demo user
 - create a new invoice
 - add a new line
 - select a product
-> traceback

opw-668141
2016-01-29 16:55:23 +01:00
Denis Ledoux a157fcd8cd [FIX] sale: Sales configuration, ir.values for all users are restricted.
The global record rule `Defaults: alter personal values only`
(`base.ir_values_default_rule`)
ensures that all users can only create personal `ir.values`.

`ir.values` for all users must therefore be created as sudo.

opw-667140
2016-01-29 16:18:12 +01:00
Aaron Bohy 5e79439dee [FIX] mail: chatter: keep mentions
Message's body is kept when switching from 'New message' to 'Log a note' since
rev. f35b48aa. However, mentionned partners or channels were lost. This rev.
makes sure to preserve both message's body and mentions when switching between
composers.
2016-01-29 13:21:02 +01:00
Aaron Bohy c04103f4da [FIX] mail: various UI fixes/improvements
- don't print chat windows
- add missing 'width: 100%' on composer and Discuss sidebar inputs (required
  for community edition)
- center the Discuss sidebar inputs
- Discuss sidebar items layout: one line, text ellipsis if name is too long
- hide chatter in 'create' mode (messages wrote in the chatter need a res_model
  and a res_id, the latter is not yet existing if we are in 'create' mode)
- revert 2d2dacc: print chatter by default (classname 'hidden-print' can be
  used for specific models for which we don't want the chatter to be printed)
- thread: ensure the displayed message's date is in the past
- re-render threads every minutes to update dates
- don't squash messages in mass mailing channels
2016-01-29 13:21:02 +01:00
Nicolas Martinelli 628a6146d2 [FIX] account: keep only taxes of the company
If the SUPERUSER creates an invoice, we should make sure to keep only
the taxes related to the company of the invoice. This is for example the
case in the PoS, where the invoice is created with the SUPERUSER.

Fixes #10648
2016-01-29 13:16:53 +01:00
Nicolas Martinelli a9a4a2e6b9 [FIX] point_of_sale: invoice Salesman
Commit a29e291 uses the SUPERUSER in order to create the invoice.
However, we should still link the Salesman of the invoice to the PoS
user.

Fixes #10647
2016-01-29 13:16:53 +01:00
Denis Ledoux a842199687 [MERGE] forward port of branch saas-6 up to 2616def 2016-01-29 12:29:17 +01:00
Nicolas Lempereur f5fedbcb18 [FIX] mail, portal_sale: conserve action in /mail/view
Methods get_formview_action can be called by sudo() so for knowing the
real user they should prefer context['uid'] to uid.

Without the action `/web` can't figure out that e.g the view we want is
the one for portal user and not the default one.

With this fix, portal user (not in base.group_user) get to the intended
view with the intended menu when clicking on a invoice/sale order portal
mail link. As for other user there is no change.

closes #10681
opw-666260
2016-01-29 12:08:24 +01:00
Goffin Simon 1414d60b7b [FIX] stock: creation of stock inventory adjustement
The system cannot create two inventory adjustements in state 'in Progess'
with the same product, with the same location, same package, same lot and
same owner.
Example:if two adjustments(ADJ1, ADJ2) are created with the same product(P)
and with the same location(L), let's say:
qty_available for P is 10
in ADJ1: Theoritical Quantity=10 and Real Quantity=20 => a quant with +10 is created
in ADJ2: Theoritical Quantity=10 and Real Quantity=30 => a quant with +20 is created

When ADJ1 is validated then qty_available for P is now 20(that 's ok)
When ADJ2 is validated then qty_available for P is now 40(that's wrong because
the Real Quantity is expected which is 30)

This is why this fix is required.

opw:660658
2016-01-29 12:03:14 +01:00
Denis Ledoux 2616defe35 [MERGE] forward port of branch 8.0 up to edeb5a8 2016-01-29 11:41:24 +01:00
Richard Mathot cf79fc899d [FIX] purchase: state "approved" has been replaced by "purchase" in Odoo 9.0
(thanks to @tfr-odoo for spotting the bug)
2016-01-29 10:23:00 +01:00
xmo-odoo edeb5a8c0f [FIX] module finder path parameter should be optional
According to PEP302, the signature of `Finder.find_module` should be 
`find_module(fullname, path=None)`.

Ever since it was introduced in 64ec5f36df the addons import hook 
defines the second parameter as mandatory, which is an issue for
systems relying on the specified behaviour (and not needing to
provide a path) like the stdlib's `pkgutil.find_loader`.

fixes #10670
2016-01-29 10:20:08 +01:00
Raphael Collet ca7983a40f [FIX] account_budget: in test, use float_compare to compare amounts 2016-01-29 09:37:27 +01:00
Raphael Collet 812332855a [IMP] fields: speedup Float.convert_to_cache by not rounding the value 2016-01-29 09:37:27 +01:00
Raphael Collet f0646cb51b [IMP] fields: use a "lazy" cursor to compute attribute digits
Borrowing a cursor each time you access `field.digits` may be costly, because
of the connection reset.  Moreover, in most cases, the cursor is not used at
all, since the decimal precision are kept in cache.

For the installation of module `product` with its demo data, the number of
cursor allocations was reduced from ~1500 to about 50!
2016-01-29 09:37:27 +01:00
Joren Van Onder 6f4e7867f0 [IMP] hw_escpos: add the MAC address to the ticket printed at startup
Usually when setting up a POSBox you want it to have a static IP. The
best way to do that is by configuring whatever DHCP server is
used (usually just on the router) to always assign the same IP to a
certain MAC address (naming depends on what is being used, sometimes
it's called static DHCP but it's also known as DHCP reservations and a
bunch of other names).

The process of setting this up is complicated for a non-technical user,
and this attempts to make it a little bit easier to do by immediately
giving them the correct MAC address they should use. To avoid confusion
this only prints the MAC addresses for interfaces which have an IP
address.
2016-01-29 09:25:15 +01:00
Denis Ledoux 433732aa8c [FIX] hr_timesheet_sheet: fields displayed twice in configuration
Regression introduced by rev.
024546919e

This layout is consistent with the rest of this
configuration view.

Fixes #10510
opw-668129
2016-01-28 17:55:43 +01:00
Nicolas Lempereur 29be9ae80b [FIX] web: conserve /id for saved export list
With 003d85b instead of getting the name of the relation
field_relation we get field_relation/id which will get us an xmlid
instead.

But the data about related fields are not gotten all at once when
opening the export modal. They are gotten by clicking on the arrow of
the related record.

It is in this data that the /id will be appended for the field, but when
getting a saved export list, this data may not be available.

This commit immediately add the `/id` when a field is put in "Fields to
export" column, so this inconsistency is no more.

closes #10640
fixes #10327
opw-665994
2016-01-28 17:27:18 +01:00
qsm-odoo 1982ef993e [FIX] web: listview editable, non editable elements
When editing a line, leave the buttons visible.
Also remove the 3px gap between fields so that readonly field texts
does not move when entering the edition mode.
2016-01-28 17:18:24 +01:00
Nicolas Martinelli 1b04b1d71a [IMP] purchase: default account journal
When the user clicks on the stat button "Invoices", then creates a new
invoice, the default currency of the new invoice will be based on the
default account journal. If the default account journal is not in the
currency of the PO, this will lead to an invoice which is not in the
same currency than the PO. This is not a bug in itself, but most of the
time, the user will want to create an invoice in the same currency than
the PO.

If no invoice is linked to the PO, the fix sets a default account
journal in the currency of the PO, as long as one can be found. If an
invoice is already linked to the PO, it uses the same account journal.

opw-667743
2016-01-28 17:14:42 +01:00
qsm-odoo 31e8cd0949 [FIX/IMP] project,web: kanban cover image dialog
* Fix the grid display of images (use the column property)
* Use Dialog class
* Allow removing a cover image
* Add image selection before choosing it (or double click to choose)

+ add less mixins in web for columns property
2016-01-28 17:11:39 +01:00
Denis Ledoux fd038801c0 [FIX] im_livechat: Strict MIME type.
Backport of revisions
 - 100d604cb0
 - ddd3e08fbc
opw-667814
2016-01-28 16:48:46 +01:00
Raphael Collet 995b257a6c [FIX] fields: make related_sudo work for draft records (2)
Traversing new records in a different cache requires that all new records on
the path are copied across caches.  Make the copy across caches recursive when
the first record on the path is a new record.
2016-01-28 16:33:09 +01:00
Nicolas Martinelli 79c20415b2 [FIX] purchase: source document of invoice
When a vendor bill is created, no source document is added
automatically. Moreover, since the field is hidden when empty, there is
no way for the user to fill it.

The fix fills in automatically the source document field from the list
of PO.

opw-667055
2016-01-28 15:59:04 +01:00
Nicolas Lempereur 657b2213b1 [FIX] website_theme_install: search view cause oddness
Sometimes, the custom search view of website_theme_install would get
called instead of the true default view.

opw-667778
opw-667779
2016-01-28 15:34:01 +01:00
Denis Ledoux afd2dbfb7f [FIX] mrp_repair: quotation report, shipping and invoice address
Copy the structure of the sale order report regarding the
partner, invoice and shipping address.

Besides, on a repair order, this is possible
to set a shipping address without setting
an invoice address (if no invoicing is set).

In such a case, the `Invoice address:` must be hidden.

opw-666506
2016-01-28 15:08:06 +01:00
Christophe Matthieu d958cf541a [FIX] web_editor: enter keydown create new td only if the caret is on the last char of the last line of the td 2016-01-28 14:57:21 +01:00
Christophe Matthieu d1abc952cc [FIX] tools: XMLTranslator doen't use self.parser arguments to create new instance of XMLTranslator
issue: When a translation contain valid hmtl but invalid xml the content is escape (translate.py: line 218).
2016-01-28 14:57:21 +01:00
Christophe Matthieu 2b4fb7e195 [FIX] web_editor: remove style attribute if empty 2016-01-28 14:57:21 +01:00
Jeremy Kersten 28e2dcf043 [FIX] website_payment, website_mail: fix route declaration typo
Missing s of method for allowed methods.
2016-01-28 14:00:26 +01:00
Goffin Simon ca343f7b04 [FIX] purchase: currency_id in purchase report
The field currency_id must be in the view to group by currency_id.

opw:667869
2016-01-28 13:40:57 +01:00
Nicolas Martinelli 9052bdc9cb [FIX] account: calculation of amount residual
When an account move line is reconciled with debits and credits, both are
subtracted from the original amount. This is not logical, since if the
line is a credit (debit) we should subtract (add) the debits and add
(subtract) the credits.

opw-667137
2016-01-28 13:33:43 +01:00
Martin Trigaux c5923774a0 [FIX] web_settings_dashboard: missing terms in .pot
Get more features with the Enterprise Edition!
opw 666709
2016-01-28 17:44:28 +05:30
Luc De Meyer b493faf595 [FIX] account: pass context as kwargs
context -> context=context in writes within validate.
This is required for super().write with new api.

Closes #10645
2016-01-28 17:30:41 +05:30
Martin Trigaux 261380250d [IMP] base: do not warn about new application installation
This warning is linked to SaaS pricing and should not be present in base
has been moved to internal code.
2016-01-28 17:19:08 +05:30
Martin Trigaux 366d584065 [FIX] inter_company_rules: no warehouse defined on sale order
With:

Two companies 'Company A' & 'Company B'
Sequences for SO & PO for each company
so_from_po set to True on 'Compny B'
When:

Company A created a PO with Company B as supplier, and validated it,
An error is raised "Configure correct warehouse for company(Company B)..."
The field warehouse_id is required on the SO, so force the user to set one in
the configuration of the company
2016-01-28 15:47:47 +05:30
Denis Ledoux 5ff25215c7 [FIX] product_visible_discount: trigger property on overriden product_uom_change
This revision is related to feb2ede0d6

When overriding an onchange method, the `@api.change` property,
that decides on which fields the onchange method must be triggered,
should be the same on the overriding and the overriden method.

Otherwise, the base onchange won't be triggered on the fields
it expected to.

opw-668049
2016-01-28 11:08:49 +01:00
qdp-odoo d35e75f7eb [FIX] account: fixed computation of reconciled fields on account.move.line and account.invoice which were wrong due to bad usage of float_is_zero() 2016-01-28 10:58:38 +01:00
Goffin Simon 3fab3a1347 [FIX] purchase: width in tree view
In enterprise/web/static/src/xml/base.xml, the javascript template
ListView uses on each column (field) column.width() where width is
a javascript function. Then argument width cannot be use in tree view.

opw:667465
2016-01-28 09:56:00 +01:00
Christophe Matthieu 51a1926353 [FIX] computed html field should not have "note-editable" class
opw-660810
2016-01-28 09:28:33 +01:00
Denis Ledoux a2d3d4d449 [FIX] ir_sequence: range_ actually uses the range start date
In a sequence, `range_year` is supposed to be the year
of the range beginning date:

```
When subsequences per date range are used,
you can prefix variables with 'range_' to use
the beginning of the range instead of the current date,
e.g. %(range_year)s instead of %(year)s.
```

Therefore, for a sequence with ranges configured as:
 - 20150701 to 20160630
 - 20160701 to 20170630

An invoice confirmed on 20160101 must have `2015`
as year when using `range_year`, and not `2016`.

If you would like the invoice effective date,
you must then use `year`, instead.

We add the `current_%` keys as well,
in case some users absolutely want the
`now` date instead of the effective date,
but it doesn't make much sense in the context
of accounting.

Besides, outside the context of the accounting,
`year`, `month`, `date` etc is the `now` date.

opw-649487
2016-01-27 19:10:09 +01:00
Jeremy Kersten bb2ecb3672 [FIX] website: typo - missing s
Who has eaten the s ?
2016-01-27 17:55:35 +01:00
Denis Ledoux e2d16ea04a [FIX] account_voucher: unreconcile with deleted journal items
This is possible to unreconcile and then remove journal
items associated to `account.voucher.line`.

When it's done, the voucher is within a corrupted state,
with debits and credits lines without journal item, which
is required.

Because the journal item of this line is empty,
while required, this is no longer possible to use
the "Unreconcile" button, because the form is invalid.

In order to allow to unreconcile a posted customer/supplier
payments with missing journal items, we set
the journal items as required only when the payment
is within the `draft` stage.

opw-667232
2016-01-27 16:36:26 +01:00
qdp-odoo 3fcb70e314 [FIX] account_extra_reports: sale/purchase journal fixed (tax summary was completly wrong and crashing) 2016-01-27 16:32:52 +01:00
qdp-odoo fb187b034b [FIX] account: aged partner balance was crashing because of access rights errors in multi company environment + error fixed in history building 2016-01-27 16:31:09 +01:00
Martin Geubelle f19210ee08 [FIX] web: properly remove nvd3 tooltips
We fixed it for the graph view in 6bdf72bac5f6e8 but this
needs to be fixed for every views.
2016-01-27 16:31:16 +01:00
Géry Debongnie 36994a6616 [FIX] web: load async js modules as soon as possible
The module system allow modules to return a deferred.  When that
deferred resolves, the module is considered to have succesfully loaded,
and the result value is its value.  Then, the boot.js code used a
setTimeout (via _.defer) to load all its dependencies.

This is not wrong per se, but it empties the call stack, which give
other code the opportunity to interfere.  In particular, it is an issue
in phantomjs tests, because it causes a window between the
domcontentloaded event (which is a key event in website) and the actual
loading of all dependent modules.  This execution window can be used to
start some tours, but the code of those tours is waiting the next tick
to load, so horrible crashes happens.

This commit calls immediately process_jobs to avoid those issues.
2016-01-27 16:07:19 +01:00
Christophe Simonis d2f8485323 [FIX] account: correct migration of tags and taxes 2016-01-27 15:56:56 +01:00
Denis Ledoux 3622c0d12a [FIX] product: product price assumed currency
Before this revision, with a configuration setup
like this:
 - Company A - Currency EUR
 - Company B - Currency USD
 - Public Pricelist- Currency EUR
 - Product A - Company A - Price 100 (EUR)
 - Product B - No company - Price 100

When a user set in Company B browses the `/shop`,
the pricelist applied is the public pricelist,
and, therefore, the prices are shown in EUR
(nothing wrong so far),
but the currency of the price set on the products
were assumed in USD, the user company currency, and,
therefore, the rate conversion from USD to EUR
was applied.

The product A, configured with a sale price of 100€
in the company A, was therefore displayed to 92€
(100€ * the USD-EUR rate).

The product B, without any company set, as well.

Meaning, two users from two different companies using the same
pricelist see two different prices in the same currency,
because their companies do not use the same currency.
This doesn't make any sense.

With this revision,
when setuping a sale price on a product, the currency
of this price is assumed in the currency of the company
set on the product.

If there is no company set on the product (the company
is not required), the currency assumed is then the currency
of the main company.

opw-666059
2016-01-27 14:10:50 +01:00
Joren Van Onder 634c62610e [FIX] purchase: only search in requested model
Because otherwise a user who has access to a view displaying
supplier_invoice_count will get an access error if he doesn't also have
access to purchase.order, even if that wouldn't have been displayed.

opw-666935
2016-01-27 13:13:03 +01:00