Refactoring send&print wizard. ============================== Main reason for this commit is that we want to let the user decide when to generate the relevant documents / approvals for its invoices. The natural choice is when the information leaves Odoo. So now, each time the users decide to download/send its invoices, he will be able to select the relevant documents to be generated and the approvals to be requested from the send&print wizard. This used to happen automatically during the posting with lots of undesirable behaviors (difficulty to update/revert, hard to know exactly what will happen,...) Main changes: 1/ Send&print wizard - The model 'account.invoice.send' has been replaced by 'account.move.send' and became models.Model to handle asynchrounous generation of documents (webservice,..) in case of more than one invoice. - The wizard is meant to be overriden in order to add checkbox and document to be generated. A comprehensive exemple can be found in account_edi_ubl_cii. 2/ Import invoice from attachments - The decoding logic has moved from account_edi to account on the attachemnts. - The function _extend_with_attachments() serve as a common entry point for import (from chatter, dashboard). 3/ Export invoice pdf / document - All the specific actions to export attachments should be implemented on the account.move and called from the wizard in _generate_documents() - The official pdf for the invoice is now only generated once the user request it. In order to regenerate the pdf and documents, it needs to be deleted. task-id: 3117238 [enterprise](https://github.com/odoo/enterprise/pull/36757) [community](https://github.com/odoo/odoo/pull/111857 ) [IMP] web: enable close on ir.actions.act_url in wizard Before this commit, calling ir.actions.act_url on a modal leaves the modal open. Which feels ackward in the send&print wizard. We now enable 'close' parameter on ir.actions.act_url. If set, the wizard will close after act_url. closes odoo/odoo#111857 Related: odoo/enterprise#36757 Related: odoo/upgrade#4387 Signed-off-by: Laurent Smet <las@odoo.com>
26 lines
1.2 KiB
XML
26 lines
1.2 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
<record id="ir_cron_auto_post_draft_entry" model="ir.cron">
|
|
<field name="name">Account: Post draft entries with auto_post enabled and accounting date up to today</field>
|
|
<field name="interval_number">1</field>
|
|
<field name="interval_type">days</field>
|
|
<field name="numbercall">-1</field>
|
|
<field name="nextcall" eval="(DateTime.now().replace(hour=2, minute=0) + timedelta(days=1)).strftime('%Y-%m-%d %H:%M:%S')" />
|
|
<field name="doall" eval="False"/>
|
|
<field name="model_id" ref="model_account_move"/>
|
|
<field name="code">model._autopost_draft_entries()</field>
|
|
<field name="state">code</field>
|
|
</record>
|
|
|
|
<record id="ir_cron_account_move_send" model="ir.cron">
|
|
<field name="name">Send invoices automatically</field>
|
|
<field name="model_id" ref="model_account_move"/>
|
|
<field name="state">code</field>
|
|
<field name="code">model._cron_account_move_send(job_count=20)</field>
|
|
<field name="user_id" ref="base.user_root"/>
|
|
<field name="interval_number">1</field>
|
|
<field name="interval_type">days</field>
|
|
<field name="numbercall">-1</field>
|
|
</record>
|
|
</odoo>
|