Commit Graph
106917 Commits
Author SHA1 Message Date
Denis Ledoux b228f548ca [FIX] website: port of rev a98d60cb11
The forward-port of the above revision missed
the conversion to the new api and that
`context` had to be replaced by `self.env.context`

Fixes #14922
Closes #14923
2017-01-11 11:03:49 +01:00
Nicolas Martinelli 5a1ec14519 [FIX] marketing_campaign: method not implemented
In the Lead Automation module, the module is working as expected when
the activity type is 'Email'. In other cases, the corresponding methods
are not implemented and raise an error.

opw-697829
2017-01-10 19:19:58 +01:00
Josse Colpaert ff098a7ad4 [FIX] mrp: procurement creation for raw materials
According to the routes set on the products of the raw materials, a
procurement may have to be created for the consumed lines of the MO.

A route may also be set on a product category. Before this patch, we
only look for procurement rules for the routes defined on the products
and on its category, ignoring the inherited route of the parent category.

Fortunetaly, we have a computed field on the product model returning
all the routes from the current category, so we use this one in the
search for procurement rules.

A test has been added to show the failure.
2017-01-10 18:42:37 +01:00
Josse Colpaert 2f66e7abde [FIX] mrp: handle the case of empty routings
Before, when the routing of a production order was empty (no operations),
it got into an inconsistent state (you click on "plan" and nothing happens).

Empty routings were used before to do subcontracting or 2-steps inventeory
(we did not set any operations on the routing but we set a location).

Here, we change the related routing field on the production order into a
calculated field which becomes empty when the routing has no operations.
This way, the "produce" button is displayed (as for production orders
without routing) and working/

This is a temporary patch to workaround the issuein a stable release.
In master, we might remove the location on routing and place it on the
workcenters and put a constraint that does not allow an empty routing.
2017-01-10 18:37:53 +01:00
Christophe Simonis 909ce5175f [MERGE] forward port branch saas-11 up to 9fa79a2d66 2017-01-10 16:57:21 +01:00
Christophe Simonis 9fa79a2d66 [MERGE] forward port branch 9.0 up to fc813847d8 2017-01-10 16:53:27 +01:00
Denis Ledoux fc813847d8 [FIX] account: wrong counterpart in invoice / out refund register payment
Revision 20935462a0
introduces the below regression:

When registering a payment on a customer invoice refund
or a vendor bill, with a payment difference

e.g. payment of 101 for an invoice of 100

and marking the invoice as fully paid,
the counter part in the payment account move
were wrongly computed:

In those cases,
its the payment total minus the invoice residual total
that must be performed, and not the other way around.

This revision solves this, inspired on how
the payment difference is computed for display
in the wizard on how it was before the above revision,
in the method `_compute_payment_difference`

Fixes #15000
2017-01-10 16:49:21 +01:00
Josse Colpaert c2040da0ba [REF] mrp: inventory post when last work order is finished
Before this patch, the inventory was automatically posted when you click
on "done" on the last planned work order. This behavior was preventing
the user from correcting, for example, the consumed quantity on the raw
materials move on the manufacturing order if it was different from the
theoretical quantity. Note that finishing anyone but the last work order
still let you edit the consumed quantity. Same with changing the lot.

Now you have to click on "mark as done" on the manufacturing order to
post the inventory. Note that this is the same behavior when working
without work order (produce > mark as done will post).

We adapt the tests to reflect this change.
2017-01-10 15:32:14 +01:00
Goffin Simon 78646696b8 [FIX] hr_attendance: attendance_manual
In Kiosk mode, the user logged cannot check in and check out his related
employee with any wrong pin.

opw:703744
2017-01-10 15:26:11 +01:00
Denis Ledoux 23deeb187d [FIX] account_check_printing: remove useless sudo
This sudo is useless, and prevent the use of the record
rules on the creation of payments.

opw-703143
2017-01-10 15:09:24 +01:00
Christophe Simonis 482fd04167 [MERGE] forward port branch saas-11 up to f1583504ce 2017-01-10 13:46:17 +01:00
Christophe Simonis f1583504ce [MERGE] forward port branch 9.0 up to 3f7b1f6083 2017-01-10 12:07:44 +01:00
Ravi Gohil 23d07478e3 [FIX] mrp: fix migration issue using recordset instead of record in loop 2017-01-10 09:44:35 +01:00
Nicolas Lempereur 3f7b1f6083 [FIX] web_editor: ignore read only + debug + write
In some case (for example the one solved with b51d21c5) we can have
write done on a field text in read only mode.

With 98ed53ce if :

- such a case happened (in b51d21c5 the fix only worked after the given
  field was written one time) or a similar instance,
- and the user was in debug mode,
- and the widget used was TextFieldHtmlSimple

this could lead to an issue with the code trying to toggle the code view
mode whilst the editor is closed.
2017-01-10 08:31:38 +01:00
Nicolas Lempereur 41c64a89a5 [FIX] stock: use avg for cost in group by report
When doing pivot table data visualization, the Unit Cost of several
lines are summed up but there has more meaning if they were averaged.

This will probably still not be perfect (such as averaging two line
with different quantities the quantities would not be taken into
accounts) but it is already slightly better.

opw-694068
2017-01-09 16:53:40 +01:00
Simon Lejeune 17adc2e09e [FIX] barcodes: form view barcode handler: concurrency
Suppose the following usecase: you scan the first product of the
picking. A server onchange is then triggered. You scan the same product
a second time, before the first onchange has returned. You expect that
the first onchange is completely executed before running the second one.
This was not the case. Moreover, some onchanges were not be able to
work with the invalid  state of the formview at some times, and crashed.

The previous implementation was wrong because id didn't run the main
barcode processing mechanism inside a Mutex. It was also wrong because
it didn't correctly wait for the onchange to execute (a previous  barcode
onchanges or some classic ones) before setting the barcode field.
2017-01-09 16:36:00 +01:00
Nicolas Lempereur f27e69eced [FIX] web_editor: harmless ; missing in 98ed53ce 2017-01-09 16:26:15 +01:00
Nicolas Lempereur 81b668c3e3 [IMP] web_editor: tour testing inline editor saving (up to s11)
With 98ed53ce when a form view is saved when a html field is in code
view mode, the change is not lost.

This new backend tour check that when saving in or not in code view, the
content is saved effectively.

The test not in code view would ensure issues like #14381 #14351 #14394
are detected on runbot.

closes #14475
opw-693052

note: the old test system is used so this test is only for up to saas-11
2017-01-09 16:06:46 +01:00
Nicolas Lempereur 98ed53ce3a [FIX] web_editor: don't lose modified code view content
The intended scenario when using the code view is the following:

1) click on code view button to use code view
2) make changes
3) click on code view button to get back to wysiwyg view
4) save from the wysiwyg view

If the 3rd step was not done:

- for the inline editor, we lose the changes that have been done in
  code view,
- for the iframe editor, we lose the entirety of the content.

At one time the user was forced to go back to wysiwyg before being able
to save, but this have been removed hence the present usability issue.

With this fix, when the editor content is saved, if the user is in code
view he is automatically set back to wysiwyg view.

fixes #14648
closes #14475
opw-678677
opw-693052
2017-01-09 16:04:42 +01:00
Goffin Simon 0b2bb25084 [FIX] web_kanban: disable_multiple_selection in kanban creation
Fine tuning of this commit: 47e7f74022
Now when creating a record from kanban view by clicking on "+" button,
the stage_id is kept.

opw:703281
2017-01-09 15:22:41 +01:00
Nicolas Lempereur d40edd7052 [FIX] web: wraparound no create editable list
In e0c4ec54ca a change was done to improve the behavior in some
editable list instances, but this introduced a small issue for
list with line creation disabled.

With this change, doing tab or enter at last line should keep the
previous behavior of wrapping around and not creating a new line.

opw-703748
2017-01-09 15:03:29 +01:00
Pierre Masereel 9f94dbdba3 [FIX] account: ir.mode.access on products
When the 'Invoicing' or 'Accounting' module is installed without the
module 'Sales', only the admin user can create products in the database.

The expected behavior is that any 'Accounting Adviser' should be able to
manage some products in Odoo.

To allow 'Accounting Advisers' to manage products, we add them the CRUD
rights on 'product.product', 'product.template' and
'product.price.history'

opw-703610
2017-01-09 14:38:23 +01:00
Goffin Simon 47e7f74022 [FIX] web_kanban: column_add_record with required field
When a quality.alert was added from the kanban view, a traceback was raised
due to a coding error. In the fail function, the event is the second parameter.

opw:703281
2017-01-09 14:13:23 +01:00
Goffin Simon 5335f8c516 [FIX] sale: _get_tax_amount_by_group
When computing the amount tax by group, the taxes which affect base of
subsequent taxes must be taken into account.

opw:703524
2017-01-09 14:03:40 +01:00
Odoo Translation Bot b5381e8537 [I18N] Update translation terms from Transifex 2017-01-09 13:18:30 +01:00
Odoo Translation Bot 5f6e3f4686 [I18N] Update translation terms from Transifex 2017-01-09 12:00:30 +01:00
David Arnold 6ac397e58e [REF] account: improve inheritability.
Split method generate_account() in chart template generation to allow an easier overwritting of the vals in case a localization added some custom fields on account.account object. Courtesy of David Arnold(dar@devco.co)
2017-01-09 10:25:57 +01:00
Odoo Translation Bot 854ab68902 [I18N] Update translation terms from Transifex 2017-01-08 04:43:31 +01:00
Odoo Translation Bot d995739241 [I18N] Update translation terms from Transifex 2017-01-08 00:29:28 +01:00
Christophe Simonis 98c71b23d3 [MERGE] forward port branch saas-11 up to 9073ecb6f5 2017-01-06 18:06:14 +01:00
Christophe Simonis 9073ecb6f5 [FIX] core: effectively warn on invalid custom views
Since new-api migration of `ir.ui.view`, the method that check views
raises exceptions instead of returning a boolean. Show them as warning.

Related to #14521
2017-01-06 17:55:04 +01:00
Christophe Simonis de6aaeb546 [MERGE] forward port branch 9.0 up to e0d33ce07d 2017-01-06 17:37:33 +01:00
Christophe Simonis e0d33ce07d [MERGE] forward port branch saas-6 up to 9ba3762a32 2017-01-06 17:29:42 +01:00
Christophe Simonis 9ba3762a32 [MERGE] forward port branch 8.0 up to 75692bc988 2017-01-06 17:27:06 +01:00
Christophe Simonis c382c8f2fa [IMP] core: module loading: less verbose logs
Only warn about non loaded declared models with a minimal logging level.
2017-01-06 17:11:30 +01:00
Nicolas Martinelli 100077f035 [FIX] payment_paypal: correctly parse payment_date
Paypal formats the payment date in this specific format:
`HH:MM:SS Mmm DD, YYYY PDT`.

Source: https://developer.paypal.com/webapps/developer/docs/classic/ipn/integration-guide/IPNandPDTVariables/

opw-693574
2017-01-06 14:27:17 +01:00
Nicolas Martinelli 756449cfe1 [FIX] payment_paypal: fields.Datetime
Obviously, it should be `fields.Datetime`, although it luckily works
with `fields.datetime.now()`.

opw-693574
2017-01-06 14:27:17 +01:00
Nicolas Lempereur 4cec6fa77e [FIX] point_of_sale,web: stupid amend before merge
Introduced by 07bf7bf4f3.
2017-01-06 14:24:59 +01:00
Nicolas Lempereur 07bf7bf4f3 [FIX] odoo-bin: server UTC timezone on windows
On UNIX, the timezone modules conversions can be reset by using
`time.tzset()`. On windows this is not available and the timezone (TZ)
environment variable must be set before the first import of time module.

If not, all datetime gotten in python without specifying UTC (such as
datetime.datetime.now) could be wrong.

This was fixed with 4a77c6a0 in 2013, but has come back since 389c2ba97b
imported pkg_resources (which do  a `time` module import) before that.

closes #14926
opw-693764
2017-01-06 14:19:09 +01:00
Nicolas Martinelli 56c798a323 [FIX] website_portal_sale: VAT check
- Create a SO for a customer (without VAT), validate the invoice
- Connected as the customer, go to 'my/account', and change any
  information (e.g. phone number).

You receive the error 'Changing VAT number is not allowed...'.

This is because `data.get('vat', partner.vat)` is `u''`, while
`partner.vat` is `False`.

opw-696962
2017-01-06 11:49:28 +01:00
Martin Trigaux b7bad9dbc4 [I18N] followup of 5284c43be5
Previous commit was cleaning the orphan and fuzzy translations of all main translations.
This commit does the same for all regional languages (that are not on Transifex).
To keep these files small, keep only the translated strings.
Fixes #14937
2017-01-06 10:40:39 +01:00
Jérome Maes de21eda9f4 [FIX] google_calendar: fix update events from googleCal due to migration 2017-01-06 09:02:26 +01:00
Nicolas Lempereur 678c42aeb0 [FIX] web: FieldCharDomain wrong count if other lang
The number of records selected by a FieldCharDomain was only computed
with the base language.

But when selecting the domain with a modal window, or when sending a
mass mailing restricted to a domain, the current user language is used.

With this commit, the number of records is computed with the current
user language.

opw-693836
2017-01-05 19:18:06 +01:00
Denis Ledoux c389a6576b [FIX] website_mass_mailing: typo in unsubscription confirmations and translatable
There was an obvious typo in these confirmations,
and they were not yet translatable.

opw-703745
2017-01-05 16:59:16 +01:00
Martin Trigaux 9eba141bba [FIX] point_of_sale: put order back to xml
Was removed at 467ba386 but need it in blackbox for many terms
The alternative is to add all the fields in export_for_printing but this patch,
even if less modular, is way smaller and safer.
2017-01-05 16:32:46 +01:00
Nicolas Martinelli 35b79e30b2 [FIX] web: select completion no result
When a search is performed and the completion feature is used (search on
a many2one field), clicking on a '(no result)' item causes a crash.

opw-703557
2017-01-05 13:45:06 +01:00
Goffin Simon 416892279d [FIX] account_asset: Wrong account set in Vendor Bill
This reverts commit 804ef6f.

1. Generating the vendor bill by adding the related Purchase Order:
in that case, it works well since the system has a first on-change on the product when selecting the asset type;
it sets the asset account in the expense account of the product which in turn is used as the vendor bill account.

2. Creating the vendor by adding manually the product which is an asset:
in that case it takes the wrong account since it used the depreciation account instead of the asset one.

But the labels cannot be changed because the case 1 works.

opw:702265
2017-01-05 13:21:51 +01:00
Goffin Simon bf89a58acd [FIX] l10n_es: Wrong user_type_id for 47... accounts
opw:696888
2017-01-05 13:01:11 +01:00
Nicolas Martinelli 5384c8c8e2 [FIX] account: planner link
The link to change the Terms and Conditions doesn't work.

opw-703525
2017-01-05 12:43:37 +01:00
Martin Trigaux 5284c43be5 [I18N] generate and clean orphan translations
Some languages were published on Transifex in v9 but no longer in v10.
These languages were still using the outdated .po files
In some of these po, there were some fuzzy translations that were incorrect
(e.g. 'POS Order %s' - 'Kassa ostud', missing '%s')
These were not erased as still using the old translations.
Regenerate a correct .po file based on the new .pot and remove fuzzy
translations.

Fixes similar issue than raised at #14937
2017-01-05 12:01:27 +01:00