-
-
Notifications
You must be signed in to change notification settings - Fork 360
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MIG] base_delivery_carrier_files: Migration to 10.0
- Loading branch information
Showing
19 changed files
with
267 additions
and
264 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,33 @@ | ||
**This file is going to be generated by oca-gen-addon-readme.** | ||
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg | ||
:target: https://www.gnu.org/licenses/agpl-3.0-standalone.html | ||
:alt: License: AGPL-3 | ||
|
||
*Manual changes will be overwritten.* | ||
=========================== | ||
base_delivery_carrier_files | ||
=========================== | ||
|
||
Please provide content in the ``readme`` directory: | ||
This module was written to extend the functionality of picking to support generating one or more files according to carrier_file configuration for all pickings | ||
and writes this file to a configurable location on your computer eg. /opt/data/carrier_files | ||
|
||
* **DESCRIPTION.rst** (required) | ||
* INSTALL.rst (optional) | ||
* CONFIGURE.rst (optional) | ||
* **USAGE.rst** (optional, highly recommended) | ||
* DEVELOP.rst (optional) | ||
* ROADMAP.rst (optional) | ||
* HISTORY.rst (optional, recommended) | ||
* **CONTRIBUTORS.rst** (optional, highly recommended) | ||
* CREDITS.rst (optional) | ||
Discription: | ||
Base module for creation of carrier files (La Poste, TNT Express Shipper, ...). | ||
Files are exported as text (csv, ...). | ||
It contains : | ||
- the base structure to handle the export of files on Delivery Orders | ||
- an API to ease the generation of the files for the developers in sub-modules. | ||
|
||
Content of this README will also be drawn from the addon manifest, | ||
from keys such as name, authors, maintainers, development_status, | ||
and license. | ||
The delivery orders can be grouped in one files | ||
or be exported each one in a separate file. | ||
The files can be generated automatically | ||
on the shipment of a Delivery Order or from a manual action. | ||
They are exported to a defined path or | ||
in a document directory of your choice if the "document" module is installed. | ||
|
||
A good, one sentence summary in the manifest is also highly recommended. | ||
A generic carrier file is included in the module. | ||
It can also be used as a basis to create your own sub-module. | ||
|
||
Sub-modules already exist to generate file according to specs of : | ||
- La Poste (France) : delivery_carrier_file_laposte | ||
- TNT Express Shipper (France) : delivery_carrier_file_tnt | ||
- Make your own ! Look at the code of the modules above, | ||
it's trivial to create a sub-module for a carrier. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink | ||
access_delivery_carrier_file,delivery.carrier.file,model_delivery_carrier_file,base.group_sale_salesman,1,0,0,0 | ||
access_delivery_carrier_file_manager,delivery.carrier.file manager,model_delivery_carrier_file,base.group_sale_manager,1,1,1,1 | ||
access_delivery_carrier_file,delivery.carrier.file,model_delivery_carrier_file,sales_team.group_sale_salesman,1,0,0,0 | ||
access_delivery_carrier_file_manager,delivery.carrier.file manager,model_delivery_carrier_file,sales_team.group_sale_manager,1,1,1,1 | ||
access_delivery_carrier_file_partner_manager,delivery.carrier.file partner_manager,model_delivery_carrier_file,base.group_partner_manager,1,0,0,0 |
105 changes: 51 additions & 54 deletions
105
base_delivery_carrier_files/views/carrier_file_view.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,64 +1,61 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<openerp> | ||
<data> | ||
<odoo> | ||
<record id="view_delivery_carrier_file_tree" model="ir.ui.view"> | ||
<field name="name">delivery.carrier.file.tree</field> | ||
<field name="model">delivery.carrier.file</field> | ||
<field name="arch" type="xml"> | ||
<tree string="Carrier File"> | ||
<field name="name"/> | ||
<field name="type"/> | ||
<field name="auto_export"/> | ||
<field name="group_pickings"/> | ||
</tree> | ||
</field> | ||
</record> | ||
|
||
<record id="view_delivery_carrier_file_tree" model="ir.ui.view"> | ||
<field name="name">delivery.carrier.file.tree</field> | ||
<field name="model">delivery.carrier.file</field> | ||
<field name="arch" type="xml"> | ||
<tree string="Carrier File"> | ||
<field name="name"/> | ||
<field name="type"/> | ||
<record id="view_delivery_carrier_file_form" model="ir.ui.view"> | ||
<field name="name">delivery.carrier.file.form</field> | ||
<field name="model">delivery.carrier.file</field> | ||
<field name="arch" type="xml"> | ||
<form string="Carrier File"> | ||
<group colspan="4" col="4" name="general"> | ||
<field name="name" select="1"/> | ||
<field name="type" select="1"/> | ||
<field name="auto_export"/> | ||
<field name="group_pickings"/> | ||
</tree> | ||
</field> | ||
</record> | ||
|
||
<record id="view_delivery_carrier_file_form" model="ir.ui.view"> | ||
<field name="name">delivery.carrier.file.form</field> | ||
<field name="model">delivery.carrier.file</field> | ||
<field name="arch" type="xml"> | ||
<form string="Carrier File"> | ||
<group colspan="4" col="4" name="general"> | ||
<field name="name" select="1"/> | ||
<field name="type" select="1"/> | ||
<field name="auto_export"/> | ||
<field name="group_pickings"/> | ||
<separator string="Write options" colspan="4"/> | ||
<group colspan="4" col="4"> | ||
<field name="write_mode"/> | ||
<group colspan="2" col="2"> | ||
<field name="export_path" attrs="{'required': [('write_mode', '=', 'disk')], 'invisible': [('write_mode', '!=', 'disk')]}"/> | ||
</group> | ||
<separator string="Write options" colspan="4"/> | ||
<group colspan="4" col="4"> | ||
<field name="write_mode"/> | ||
<group colspan="2" col="2"> | ||
<field name="export_path" attrs="{'required': [('write_mode', '=', 'disk')], 'invisible': [('write_mode', '!=', 'disk')]}"/> | ||
</group> | ||
</group> | ||
</form> | ||
</field> | ||
</record> | ||
</group> | ||
</form> | ||
</field> | ||
</record> | ||
|
||
<record id="action_delivery_carrier_file_form" model="ir.actions.act_window"> | ||
<field name="name">Carrier File</field> | ||
<field name="type">ir.actions.act_window</field> | ||
<field name="res_model">delivery.carrier.file</field> | ||
<field name="view_type">form</field> | ||
<field name="view_mode">tree,form</field> | ||
</record> | ||
<record id="action_delivery_carrier_file_form" model="ir.actions.act_window"> | ||
<field name="name">Carrier File</field> | ||
<field name="type">ir.actions.act_window</field> | ||
<field name="res_model">delivery.carrier.file</field> | ||
<field name="view_type">form</field> | ||
<field name="view_mode">tree,form</field> | ||
</record> | ||
|
||
<menuitem action="action_delivery_carrier_file_form" id="menu_action_delivery_carrier_file_form" parent="delivery.menu_delivery"/> | ||
<menuitem action="action_delivery_carrier_file_form" id="menu_action_delivery_carrier_file_form" parent="delivery.menu_delivery"/> | ||
|
||
<record id="view_delivery_carrier_form_inherit" model="ir.ui.view"> | ||
<field name="name">delivery.carrier.form.file</field> | ||
<field name="model">delivery.carrier</field> | ||
<field name="inherit_id" ref="delivery.view_delivery_carrier_form" /> | ||
<field name="arch" type="xml"> | ||
<data> | ||
<field name="product_id" position="after"> | ||
<field name="carrier_file_id"/> | ||
</field> | ||
</data> | ||
</field> | ||
</record> | ||
<record id="view_delivery_carrier_form_inherit" model="ir.ui.view"> | ||
<field name="name">delivery.carrier.form.file</field> | ||
<field name="model">delivery.carrier</field> | ||
<field name="inherit_id" ref="delivery.view_delivery_carrier_form" /> | ||
<field name="arch" type="xml"> | ||
<data> | ||
<field name="name" position="after"> | ||
<field name="carrier_file_id"/> | ||
</field> | ||
</data> | ||
</field> | ||
</record> | ||
|
||
</data> | ||
</openerp> | ||
</odoo> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,37 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<openerp> | ||
<data> | ||
<record id="view_picking_out_form_carrier_file" model="ir.ui.view"> | ||
<field name="name">stock.picking.form</field> | ||
<field name="model">stock.picking</field> | ||
<field name="inherit_id" ref="stock.view_picking_form"/> | ||
<field name="arch" type="xml"> | ||
<data> | ||
<page string="Additional Info" position="inside"> | ||
<group> | ||
<field name="carrier_file_generated"/> | ||
</group> | ||
</page> | ||
</data> | ||
</field> | ||
</record> | ||
<odoo> | ||
<record id="view_picking_out_form_carrier_file" model="ir.ui.view"> | ||
<field name="name">stock.picking.form</field> | ||
<field name="model">stock.picking</field> | ||
<field name="inherit_id" ref="stock.view_picking_form"/> | ||
<field name="arch" type="xml"> | ||
<data> | ||
<page name="extra" position="inside"> | ||
<group> | ||
<field name="carrier_file_generated"/> | ||
</group> | ||
</page> | ||
</data> | ||
</field> | ||
</record> | ||
|
||
<record id="view_picking_out_search_carrier_file" model="ir.ui.view"> | ||
<field name="name">stock.picking.search</field> | ||
<field name="model">stock.picking</field> | ||
<field name="inherit_id" ref="sale_stock.view_picking_internal_search_inherit"/> | ||
<field name="arch" type="xml"> | ||
<data> | ||
<filter name="to_invoice" position="after"> | ||
<separator orientation="vertical"/> | ||
<filter icon="terp-emblem-documents" name="carrier_file" string="Carrier File To Generate" | ||
domain="[('carrier_file_generated', '=', False), | ||
('carrier_id', '!=', False), | ||
('carrier_id.carrier_file_id', '!=', False), | ||
('picking_type_id.code', '=', 'outgoing'), | ||
('state', '=', 'done')]" | ||
help="Delivery orders to invoice"/> | ||
</filter> | ||
</data> | ||
</field> | ||
</record> | ||
</data> | ||
</openerp> | ||
<record id="view_picking_out_search_carrier_file" model="ir.ui.view"> | ||
<field name="name">stock.picking.search</field> | ||
<field name="model">stock.picking</field> | ||
<field name="inherit_id" ref="stock.view_picking_internal_search"/> | ||
<field name="arch" type="xml"> | ||
<data> | ||
<xpath expr="//field[@name='partner_id']" position="before"> | ||
<separator orientation="vertical"/> | ||
<filter icon="terp-emblem-documents" name="carrier_file" string="Carrier File To Generate" | ||
domain="[('carrier_file_generated', '=', False), | ||
('carrier_id', '!=', False), | ||
('carrier_id.carrier_file_id', '!=', False), | ||
('picking_type_id.code', '=', 'outgoing'), | ||
('state', '=', 'done')]" | ||
help="Delivery orders to invoice"/> | ||
</xpath> | ||
</data> | ||
</field> | ||
</record> | ||
</odoo> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.