Commit Graph
102174 Commits
Author SHA1 Message Date
Anton Chepurov 1d269d20f2 [FIX] website: sitemap scalability
Checking url_list for duplicates is O(n).
Use url_set instead of url_list to improve to O(1).

Otherwise sitemap generation even for a million products will never finish.

Close #11106
2016-02-26 09:48:12 +01:00
Jeremy Kersten cfcf8bb318 [FIX] product: avoid traceback when product had no variant.
Compute price with a product template without product product
raises a traceback: index out of tuple
2016-02-26 09:47:48 +01:00
Damien Bouvy 89df4aa5ec [FIX] sale: when creating the invoice, call the additional fields helper function
This function is there to avoid creating link modules, it is extended
by account modules and should be called by methods that create invoices.

This call was missing in sale.
2016-02-26 09:15:36 +01:00
Damien Bouvy 550fa2650a [FIX] account_asset: do not overwrite self.asset_category_id if it's already defined
The function _set_additional_fields is used to avoid creating a ton
of auto-install modules; account extension extend this function and
modules that create invoices call it.

But when calling this function, it would be better not to overwrite
existing values; hence this check.
2016-02-26 09:15:36 +01:00
Joren Van Onder a565f35bae [FIX] pos_mercury: get rid of debug in template
Been in there since the introduction of the module at 04fb3dfc. Didn't
really affect anything as long as you don't have developer tools open
while you're printing a ticket on the POSBox. This explains why it has
remained unnoticed for this long.
2016-02-25 16:18:26 +01:00
Nicolas Martinelli 16f698f6be [FIX] sale_margin, delivery: margin at creation
The `purchase_price` is filled in automatically thanks to the onchange
method `product_id_change_margin`. However, when a SO is created
programatically, it is necessary to call manually the method in order to
fill in the field. This is not convenient since the module sale_margin
might not be installed, and crappy workaround (such as the use of
`hasattr`) are necessary.

To avoid this, this fix automatically computes the purchase price at
creation if no value is provided.
2016-02-25 15:46:09 +01:00
Nicolas Martinelli 67edccbc7f [FIX] sale: wrong forwardport
This reverts commits ca40236 and 4ed5d65. The commits were developed in
v8.0 and were not meant to be forward ported to 9.0.
2016-02-25 15:45:58 +01:00
qsm-odoo 813b6a84ab [FIX] web_tip: tip inside button
In FF, there cannot be a clickable element inside a button tag. So the
tip on the icon in a button_box button was not able to be dismissed.

The tip selector is changed so that the highlighted element is the
button itself and not the icon it contains.
2016-02-25 15:23:59 +01:00
Denis Ledoux 0eb9772ab8 [FIX] calendar: rrule computation of private events
If an event is private, a bunch of fields
are hidden for the users not being
the owner of the event, even for sudo.

The fields on which depends the `rrule`
computation were part of the hidden/private
fields.

In addition, the `rrule` is always computed
as sudo. See `_get_rulestring`.

Therefore, the `rrule` of recurrent private events
was not correctly computed when the owner wasn't
the administrator.

opw-670295
2016-02-25 15:21:42 +01:00
qsm-odoo 5a099117c4 [FIX] web(_editor): qunit tests
* Correct qunit template assets
* Delete useless template which broke qunit qweb inheritance
2016-02-25 14:45:34 +01:00
Denis Ledoux 91a01819de [MERGE] forward port of branch 9.0 up to e7ca2ca 2016-02-25 14:13:05 +01:00
Denis Ledoux e7ca2ca3da [FIX] purchase: delivery quantities with BOMs, expected singleton
`self` is the variable with all the purchase order lines,
`line` is the variable with the current line in the loop iteration.

This is expected to get the line quantity. Having written
`self` instead of `line` is an oversight of the revision
0923d1609d

opw-670502
2016-02-25 14:12:12 +01:00
Denis Ledoux b848745c45 [FIX] account: mis-aligned taxes in the invoice report
When printing an invoice, the taxes were not aligned
with the `taxes` column header.

opw-670495
2016-02-25 13:21:33 +01:00
Denis Ledoux 4a65bc384e [FIX] account: better error message when emptying journal account number
The account number field on a journal is a related field to the
number of the bank account associated to the journal.

As the number of a bank account is a required field,
any attempt to empty it from the journal fails.

Besides, unlinking the bank account from the journal when emptying
the account number on the journal form doesn't seem to be
the appropriate behavior. Imagine you give an account number
to the journal, then empty it, then re-fill it, you probably
do not want the journal entries to be associated to a new bank account,
you probably wanted the same bank account, but renamed, while
it would be the case if we simply unlink it.

If you would like to delete the bank account, you have
to do it from the bank accounts list itself.

opw-670472
2016-02-25 12:56:57 +01:00
Denis Ledoux b9f206953e [FIX] product: price list report without purchase access rights
Pass the fields parameter in the call to the `read` method,
so it fetches only the needed fields:
 - Better performances,
 - Avoid possible access rights issues.

In this case, it wasn't possible for a user
having no access rights to the purchase module
to print this report.

opw-670449
2016-02-25 12:08:40 +01:00
Denis Ledoux 8e2a309961 [FIX] res_bank: address format in form view.
Apply the layout as done in the revision
faa14705ed
in the different form containg an address.

opw-670433
2016-02-25 11:31:00 +01:00
Nicolas Martinelli 07ab3543be [FIX] sale_mrp, purchase: delivered quantity
The quantity delivered must be converted in the product UoM of the BoM
line. Indeed, the UoM of the BoM line can be different from the UoM of the
product which is manufactured.

opw-669764
2016-02-25 09:57:45 +01:00
Nicolas Martinelli 74eb4cfc30 [FIX] sale_mrp, purchase: BoM quantity
The method `_bom_explode` requires a quantity in the UoM of the BoM.

opw-669764
2016-02-25 09:57:37 +01:00
Jeremy Kersten 9ecd80eaeb [FIX] website: sitemap fix length
Iterator was consuming the first 45k records.
So don't need to specify an offset, because that will ignore the next 45k.

Eg: if step of 5, and range(1,13),
it will only use [1, 2, 3, 4, 5, 11, 12, 13]

Cherry-pick/backport of de8296c3a8
2016-02-25 09:26:56 +01:00
Christophe Simonis 3b6c243440 [MERGE] forward port of branch 9.0 up to c169c59 2016-02-24 18:50:09 +01:00
Christophe Simonis c169c59e69 [FIX] base_import: adapt forward-ported test to v9 2016-02-24 18:45:51 +01:00
Denis Ledoux 9f0120d73b [FIX] point_of_sale: Sales Details timezone
The Sales Details report wizard gives the possibility
to print the details of the POS orders between two dates.

The fields in the wizard are of type `date`,
while the orders dates are of type `datetime`.

`00:00:00` and `23:59:59` were naively added
to the `date_start` and `date_end` (respectively) to
handle the case.

But, this doesn't take care of the user time zone:
When a user choose between February 24th and February 25th,
it's within his time zone, and therefore, for the search,
where the datetime are in UTC, adding `00:00:00` isn't enough,
the dates have to be converted from the user time zone
to UTC.

opw-6698831
2016-02-24 18:26:08 +01:00
Christophe Simonis 478830d13c [IMP] product: let the ORM create the index. 2016-02-24 18:13:44 +01:00
Christophe Simonis dd875ed1a1 [MERGE] forward port of branch saas-6 up to f5ed710 2016-02-24 18:02:53 +01:00
qsm-odoo 516b1a6c72 [FIX] web: target=new forms buttons
Launching a form view in a dialog thanks to target=new did not
display the action buttons (save, discard, ...). This is because
the action_buttons flag is set to false by default and the only way
to start an action with a different value is thanks to JS code (i.e.
the debug manager modals).

Now, action buttons are also rendered if the flag footer_to_buttons
is set to true (only happens when launching an action in a modal) and
that the formview does not have any footer tag with buttons to add
(so that wizard form keep replacing the action buttons by these footer
buttons).
2016-02-24 17:13:00 +01:00
Yannick Tivisse 80b7cba812 [IMP] Delivery: Display kg on 'Put in Pack' wizard 2016-02-24 17:09:29 +01:00
Yannick Tivisse 3e464dad5d [FIX] hr_holidays: Only a manager can double validate a leave 2016-02-24 16:45:58 +01:00
Christophe Simonis f5ed710c74 [MERGE] forward port of branch 8.0 up to d4e5019 2016-02-24 16:37:41 +01:00
Goffin Simon 04ddadbe9c [FIX] mrp: _action_explode
Before the fix:

Create a product with a BoM type kit(composed with 5 products) and price=120
Select real price costing method for the product and each component
Select perpetual inventory valuation  for the product and each component
Create a PO with the product
Receive the products

When checking the journal of entries, 5 entries have been created with an
amount of 120.

After the fix:

When checking the journal of entries, 5 entries will be created with an
amount equal of the standard price of each component of the kit.

opw:670239
2016-02-24 16:13:09 +01:00
Denis Ledoux 9d48f4f346 [FIX] mrp: label & translation in production unlink Warning
opw-670059
2016-02-24 15:12:59 +01:00
qsm-odoo bf39884a5c [MERGE] *: new web_editor/website + assets improvements
Read sub-commits for more details.
2016-02-24 15:08:29 +01:00
qsm-odoo ed46965dbe [FIX] web*: tours
Selector changes + No need to open the snippet panel anymore.
2016-02-24 13:47:36 +01:00
qsm-odoo 6610d05549 [REF] web_editor,website,mass_mailing: JS/XML update
* Adapt DOM selectors
* Refactore dialog XMLs to have odoo styling
* New editor options (background-position, ...)
* Various improvements
2016-02-24 13:47:36 +01:00
qsm-odoo 58c5ff1d4f [REF] website*: frontend user navbar
* Remove use of bootstrap navbar
* Add navbar.less file for compatibility with enterprise
* Modify the location of the "new page/product/..." elements
2016-02-24 13:47:36 +01:00
qsm-odoo 88c2b6843a [REF] web,web_editor,website(_*),report,pos,mass_mailing: assets
* Remove recursive assets inclusions (i.e. assets_editor was including
assets_common, summernote, ...)
* Better construct the assets (link, then script + type attribute)
* Better include the assets (split js / css, always use t-call-assets)
* Simplifies the number of assets
* Move bootstrap js to assets common
* assets_frontend is now created by web module to allow using it on the
connexion page but also in the web_editor, where colors have to be
bootstrap/theme ones. Note: if a module depends on website, then keep
using the inherit_id="WEBSITE.assets_frontend"
2016-02-24 13:47:06 +01:00
qsm-odoo 5b65befcd8 [REF] web,web_editor,website,report,mass_mailing,mail: LESS
* Convert some CSS to LESS
* Split/Join LESS files
* Remove duplicates between website and web_editor
* UI improvements
* Allow simple customizations thanks to LESS var&mixins for website
2016-02-24 13:09:48 +01:00
qsm-odoo 40334b3342 [REF] web_editor,website,mass_mailing: editor UI unification
Before, the whole editor UI was redefined for web_editor, each
mass_mailing template, website builder, ... Now they all inherit
from the web_editor one.
2016-02-24 13:09:15 +01:00
qsm-odoo a64f64aba4 [REF] website: snippets
* Delete useless snippets
* Delete default mb,mt on snippets
* Delete useless options
* Reorganize snippets order
* Style improvements
2016-02-24 13:08:09 +01:00
Christophe Simonis 0718f807f0 [FIX] point_of_sale: bank statement opening balance
Only force computation of opening balance when cash control is enabled
2016-02-24 12:51:45 +01:00
Christophe Simonis 7e6a182e1e [FIX] point_of_sale: bank statement starting balance
When creating a new pos.session, the starting balance of created bank
statements where all the sames.

By creating bank statements with the same `journal_id` in context, they
all have the starting balance for this journal.

Create them manually to force having the starting balance for the
statement's journal.
2016-02-24 12:00:01 +01:00
Martin Trigaux be4c2ab29d [FIX] stock: duplicated term in .pot 2016-02-24 11:40:40 +01:00
Nicolas Lempereur d4e5019ec7 [FIX] web: csv export newline for text/html field
CSV export was added in f146e2a and since then newline were not
exported.

But new line should be allowed if the string is quoted by " characters
which is done in Odoo.

closes #11005
opw-667853
2016-02-24 11:26:16 +01:00
stefanorigano c4a896a8a0 [REF] website,web_editor: complete restyling 2016-02-24 11:15:55 +01:00
Goffin Simon 56241b3368 [FIX] account_budget: To print the summary of a budget
The theoritical amount is computed as:

theo amt = ellapsed time / total time period  * planned amount

where:

total time period is the difference between date_to and date_from defined
on the crossevered budget line.

ellapsed time is the difference between today and date_from.

The achievment(percentage) on a crossevered budget line is computed as:

percentage = practical amt / theo amt

where:

practical amt is the sum of all account analytic lines valid in the
crossevered budget line period.

When computing the report of a summary, the ellapsed time is equal
to the difference between date_to and date_from defined for the summary and
the practical amount only takes the account analytic lines in the summary
period.

opw:669545
2016-02-24 09:58:02 +01:00
Christophe Simonis 53742a4a70 [FIX] core: parent store compute on registry loading
When loading the registry, the parent store are defered at the end of
the registry initialisation. However, when modules should be removed, a
brand new registry is build without deleted modules, losing the list of
models on which parent store should be recomputed.
2016-02-23 18:10:53 +01:00
Stéphane Bidoul 4162b8f5fa [FIX] account: fiscal position in multi-company environments
Properties depends on with which companies the records
are browsed.

When retrieving the fiscal position as sudo,
the company must therefore be enforced within the context,
to make sure to get the properties from the right
company.

This method can totally be accessed as sudo,
within the crons for instance.

Before this revision, the recurring invoices cron
could retrieve properties from the wrong company,
and therefore retrieve the fiscal position of another
company.

Closes #11039
2016-02-23 17:25:42 +01:00
Denis Ledoux 3b36bca461 [FIX] purchase_requisition: fiscal position tax mapping
`map_tax` must be called using the fiscal position
browse record, not using its id.

Besides, `fpos` is not used further in the code.

opw-670170
2016-02-23 16:04:49 +01:00
Denis Ledoux c63be58eca [MERGE] forward port of branch saas-6 up to 8a098df 2016-02-23 15:33:08 +01:00
Jeremy Kersten 1d90e70244 [FIX] crm*: remove outdated stage_type from context
This key in context is useless since v7.0
2016-02-23 15:31:17 +01:00
Denis Ledoux 8a098df7e6 [FIX] account_asset: can't adapt browse record to id
During the conversion of the module
`account_asset` to the new API,
in revision 6120bab,
the variables `current_currency` & `company_currency`
have been changed from identifier integers to
browse records.

The currency passed in the `create` method
values must therefore be adapted according
to this change.

This prevented the correct use
of the assets when the currency of the assets
was not the same as the currency of the company.

opw-669571
2016-02-23 15:19:48 +01:00