When we duplicate a project, the related phases need to be duplicated as well but keeping references between each other.
e.g. 'project 1' with 'phase A' follwed by 'phase B' should become 'project 1 (copy)' with 'phase A (copy)' followed by 'phase B (copy)'.
Fixing bug lp:1212860, opw 607062
When we cancel a voucher, we may be trying to unlink a reconciliation that was already removed on another move (just looking at the version in cache). In such cases, the unlink would fail with traceback. opw 610287
In Settings > Sales, the onchange_timesheet ensure that if you check timesheet, it checks module_account_analytic_analysis.
Therefore, if module_account_analytic_analysis is installed, timesheet should be checked by default
Until now, it worked "luckily", because the onchange_timesheet of the field module_account_analytic_analysis was triggered before the onchange_timesheet of the timesheet field. Nevertheless, we shouldn't trust the onchange calls order.
Users don't care for the backorder picking precisely because they can't process it, whereas they may have to do some more things on the picking they processed: invoice it, print delivery orders or transportation stickers..
Refresh the browse record after changing the name to avoid the need to rebrowse.
Fixes#1372
When creating a new message, we need to reset the default_type key to avoid context propagation (e.g. invoice menu).
However we used to compare the key in context (char) with the list of selections (tuple) so it was never matching and always reset.
In the Employee form, a remaining legal leaves field is available, which shows remaining validated leaves from allocation requests
As this is not allowed to delete a validated allocation requets, it shouldn't be possible to reduce the validated remaining leaves of an employee.
To reduce the remaining leaves of an employee, the user should cancel and remove the allocation request
The user_id is already set by the prepare_invoice method, which is called before the prepare_invoice_group (the user_id is already set, thus)
Besides, _prepare_invoice is overriden in sale_stock, to set the picking sale order salesman as user_id, and, without this correct, grouping invoicse by partner re-set the user_id to uid, which is wrong.
Purchase orders created with invoice policy 'Based on incoming shipments' were not keeping the reference to the account analytic distribution when invoiced. opw 607577
When a record is created, if it inherits from mail.thread, a message 'OBJECT created' is posted. 'created' is translated but the name of the model wasn't.
This fix uses the name of the linked ir.model which is already a translatable field.
lp:1262000, opw 611043
If an action unlink the current records (e.g. unreconcile on account.move.reconcile), trigger history_back to avoid errors when trying to reload inexistant record (opw 607883)
This is a partial backport of saas-4 code (rev c0db6ae, 162ad1c) and should not be forward ported.
When creating an invoice from a sale order, if the user choose to invoice a fixed price (deposit), he has the possibility to choose an advance product. As described in the help message, this product should be a service product. Therefore, we add a domain so only services are displayed in the dropdown list
If we try to generate twice entries on the same fiscal year, we can get completly unrelated errors ("You can only reconcile journal items with the same partner").
With this, we make sure people will first cancel the entries before regeneraing the entries.
To search the contracts for payroll, the domain is constructed with three clauses. Each of these clauses needs to start with a '&' to make sure they are correctly combined with the OR clause'
The accounts "TVA en amont" were not used by the l10n_lu chart of accounts.
Instead the accounts "TVA en aval" were used for all taxes both sale and purchase taxes.
(Manual rebase of PR #735)
[FIX] mail: misc bug fixing
- avoid deleting the Whole Company mail group if still present, because it is required for some module installation. In 7.0 installing some modules may crash if this group is not present.
- fixed an issue when computing possible recipients in the Chatter
- small fix in html2plaintext about blank lines
When the cron for autovacuum runs, the osv_memory objects are deleted. The portal.wizard.user object has a required field (wizard_id) linked to another osv_memory object (portal.user) which causes a traceback when the cron tries to delete portal.user object before the portal.wizard.user. opw 609918
This instance was not actually exploitable for
SQL injection as it is not callable directly
via RPC and guarded by other queries when indirectly
called. Still plain awful.
This instance was not actually exploitable for
SQL injection as it is not callable directly
via RPC and guarded by other queries when indirectly
called. Still plain awful.
When setting a worklog on a project_issue, the field to_invoice is prefilled with on_change_account_id based on the contract settings. As the field was not present on the list view, the information was lost and every worklog was not written as invoiceable, even if enabled on the contract. opw 609082.
Displaying the pagert in view group does not make sense as it's not updated when changing filter and every group (even if more than 80) is displayed in view group
The switch mode event was triggered even if the view was not actually switched
This leaded to inconsistencies, like adding the view in the breadcrumb history, while the switch did not happen
[IMP] l10n_fr_hr_payroll: make sure the date format of Fiche de paie report is in french
report_sxw: make sure we have a fallback on en_US if trying to load an format in unknown language
Some objects (e.g. account.move.line) have a different signature than the classical 'cr, uid, ids, vals, context=None' and may add extra arguments.
This fix allows to create rules on these objects and still pass the valid arguments.
(opw 609204)
The wizard to generate recurring entries did not respect multicompany rules as the request was done in plain sql.
Add ir.rule and use the orm (opw 607782)
When a purchase requisition is created from a procurement order, a first stock move is created, not associated to any purchase orders
Then, on purchase order creation and confirmation, in the purchase requisition, new stock moves are created, associated to the purchase order.
The existing stock move issued from the procurement order which created the purchase requisition remained untouched, leading to wrong inventory values
To fix this, the destination location of the stock move of the procurement order is written on the source location
A proper fix should be to use a dedicated workflow for puchase requisition, but this can't be done in 7.0, it has to be done in master/trunk
When attempting to parse client date, value is not always a string.
We force the toString when adding the leading 0, as the replace method is for string
If a purchase requisition is created instead of a purchase order for a procurement order, the method make_po should not return the id of this requisition, as methods calling the make_po method expects ids of purchase orders, not purchase requisition ids.
Besides, on purchase requisition done or cancel, we set the procurement order accordingly, without the use of the workflow. We consider this as crappy, the proper fix should be the use of a dedicated workflow for purchase requisition, but I cannot be done in stable branches. This aims trunk/master.
The Partner VAT Intra XML delaration needs to have the VAT number
in the format without the country code prefix.
The current behaviour was to include the country code prefix in the
report which causes an SQLException error on uploading the XML file
to the Federal goverment's website. While the error is non-descriptive
fixing the VAT number format fixes the error.
[FIX] view_list: Add context propagation for m2m list view
If the _rec_name field of a model is translatable, the value was not translated when displayed in a list view through a many2many field (e.g. server_action_ids on base.action.rule).
When searching for a record in a m2o field, if we click on 'search more' we loose the focus on the field and select the first suggestion (which triggers potential on_change). This prevents the selection for this case.
When adding an item to the editable list, the focused field was no longer the first visible field
This is related to revision 4a508885ac
visible_columns list is not ordered
the code handling the keydown events was moved, but the variable this
was not adjusted accordingly, resulting in a broken navigation.
It is now possible to press LEFT and RIGHT again to move the focus
between facets.
In editable list, on keypress enter, the _next method is called, saving the current line and starting the edition of the next one
The _next is triggered before the date(time) field change event, and, therefore, the saved value of the date(time) field is the old one
Prior to this fix, the domain was set in the onchange methods onchange_company_id. Therefore, if the onchange was not triggered, the domain wasnt apply (e.g. while editing an existing invoice).
[FIX] event: change the field nbevent to make sense
The field nbevent was representing the number of registration with value of 1 for events without registrations (which makes no business sense). Fix to actually represent the number of registrations and display a better field name.
sale_order module override state field of sale.oder (sale.sale.py) and forgot to reset the track_visibility, therefore sale orders state changes are no longer tracked once this module installed.
This will make sure already processed rules are persisted
in case a timeout occurs while processing the next ones,
ensuring that *some* progress can be made in most cases.
A safety guard already in place prevents the recursive
trigger of rules while another rule is being executed,
as a simple measure to prevent endless loops.
This guard was missing when processing time-based rules.
A programming error introduced at rco@openerp.com-20121220142445-emzzvhlw400q37c9
fails to properly check when a rule has already been executed in the past.
Time-based rules should only be executed if the trigger date is in the past and:
- either they never executed before
- or the last execution date is older than the trigger date
Executing a rule always updates the `last_run` value, which would
always force a useless registry reload to occur. Only signal the
change if the rule applies to a model that was not previoulsy
monitored for base action rules.
The field note on account.fiscal.position and account.fiscal.position.template should not be translatable in classic modules.
The l10n_multilang module is intendend to make chart of accounts multilang and is the place to set translate=True
If the writeoff_amount is above 0, the fields writeoff_acc_id can be displayed and is required depending of the payment option. If the writeoff_amount is reset to 0, this field should no longer be required.
User should be at least have Configuration settings group to be allowed to create actions. Basic document page users do not have this rights, therefore we temporary give superuser_id to create the action
This is related to rev 133c5033a0
When creating a grouped invoice, the invoice_vals value is used to create the invoice line.
The value was not reset for grouped invoice and we reused the values of previous line.
Some browsers (e.g. chrome) trigger onEmptyClick as well as
onBeforeLightbox during drag&drop which calls two slow_create
calls (and two popups). Workaround to kill the second one.
[FIX] mail: detection of MIME type
When parsing the mail headers, the content-type may has a 'type' attribute for Multipart/Related objects (rfc2387).
Previous check would match on attached files of type text instead of real `content-type: text/`.
Be careful, content-type may contain tricky content like in the
following example so test the MIME type with startswith()
Content-Type: multipart/related;
boundary="_004_3f1e4da175f349248b8d43cdeb9866f1AMSPR06MB343eurprd06pro_";
type="text/html"
This restriction behavior copied from the sale.order model
Moreover, the purchase.order lines state were not set to cancel when the purchase order was cancelled.
This is now the case, this behavior is also coped from the sale.order model
When the purchase order is reset to draft, we also reset the order lines state to draft
[FIX] Fix o2m record duplication when clicking on a button
The button action will execute a write call, creating the new line.
The reload is necessary to avoid recreating the line when using the save button.
In the account.invoice.line form, do not assume the parent is defined when
evaluating the context to invoice_line_tax_id as we could come from another
view (e.g.: purchase order line form).
Fixes#206
When computing the aged partner balance, the partial reconciliation was not
handled correctly. The reconciled amount should be removed from the original
remaining amount instead of displaying two entries in the journal.
eg: if invocie of 1000 in period 1 and payment of 300 in period 2, should only
display +700 in period 1 instead of two entries
This commit partially reverts rev. 6036 revid:fp@tinyerp.com-20111219220053-tn5gc1lmc13fjpyf, the second part of this commit already has been revert in a previous revision.
Fix bug https://bugs.launchpad.net/openerp-web/+bug/1279885 :
Many2many fields in Tree views will not get translated.
If you check the context for a name_get of a m2m field, it is passed as
None.
Add context propagation to m2m fields in list views.
Fix translation issues when viewing a a many2many field in a Tree view.
Fix bug https://bugs.launchpad.net/openobject-addons/+bug/1292245:
Invoice budget's warning when crossovered budget lines are not related
to any account will cause a UnicodeEncodeError if the account has
unicode-only characters such as é.
Make sure that the budget name is a unicode to avoid UnicodeEncodeError
which happens when budget name contains UTF-8 characters.
Signed-off-by: Sandy Carter <sandy.carter@savoirfairelinux.com>
At the time of the context_wo_lang patch (7.0 revision 6577), the orm did not keep the language in copy_data, this patch intended to be more consistent.
Since server revision 5146 7.0, the new behaviour is to use the translated version in copy_data. Removign this change will be more consistent with the orm.
The expected behaviour is now the following:
In user lang: translated product name + translated '(copy)'
In other lang: same as original product
lp bug: https://launchpad.net/bugs/1159913 fixed
bzr revid: mat@openerp.com-20140508134937-7cbja3vsv311z5j4
The number of leave requests left is based on the employee_id key in the context, when displaying the status of an hr.holidays we don't have the information in the name_get of the hr.holidays.status.
The fallback on the number of employees is done with the uid but we can not rely on it as well as the name_get on m2o field is done with superuser_id.
bzr revid: mat@openerp.com-20140508124946-ttyr84iajg9q6l0y
Instead of raising an exception (which only interupt the call of the onchange methods), return a dictionnary to set the forbidden partner or product to an empty value.
The call is not blocking in a way to forbid creating a record that uses this partner/product but it is not possible to select it through the web interface.
bzr revid: mat@openerp.com-20140507113940-d8iynfl1lcskht63
Instead of raising an exception (which only interupt the call of the onchange methods), return a dictionnary to set the forbidden partner or product to an empty value.
The call is not blocking in a way it forbid to create a record that uses this partner/product but it make it not possible to select it through the web interface.
bzr revid: mat@openerp.com-20140507102550-sms5nbf0u7pdkci9
The body is the field used to actually display the 'log in with ...'
As not shown in the view, when adding a new provider, this field was empty and therefore wasnt visible on the login form...
bzr revid: dle@openerp.com-20140507102414-vz7ur7zvh4ptuk2e
The price mentioned on the stock move from the delivery order is the one at the time of the sale order confirmation. On average price, the price can be different when the delivery is actually done. The price will then be refreshed with the one specified on the product.
bzr revid: mat@openerp.com-20140430102847-o1fzo318rpmq9n1j
This would permanently mark the mail as failed while
there is a good chance it will be sent properly next
time it is retried (provided the memory situation
improves or the server/worker has restarted).
bzr revid: odo@openerp.com-20140430102552-qkwv20b20nve64th
The qty_available field is a function field that uses the information of the context (eg: location) to compute the value. Using the global browse record would return the same qty_available value for each location (and then produce way too many account.move)
bzr revid: mat@openerp.com-20140429124256-ljph37kijosg5dqb
The attendance date recieved by the server is in UTC while the user sees it in his timezone. This means that an attendance could be in a timesheet (bounded by dates) for a user but not for the server which would not accept a valid attendance.
The fix will make the check in the user's timezone.
Only the date part of the attendance is kept for comparison as the boundaries are dates objects.
bzr revid: mat@openerp.com-20140428153216-4s6r5hu1ov0p0ofm