Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MIG][9.0] sale automatic workflow #291

Merged
merged 121 commits into from
Jun 23, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
121 commits
Select commit Hold shift + click to select a range
db81f0a
[ADD] add sale_automatic_workflow, a module to automatized the sale o…
sebastienbeau Apr 22, 2012
6d7d798
[IMP] sale_automatic_workflow : add default value for workflow method
sebastienbeau May 6, 2012
ed2897c
[FIX] sale_automatic_workflow : fix invoice creation from picking
May 18, 2012
4e03eca
[IMP] sale_automatic_workflow: redesign of sale order view
guewen May 24, 2012
330890d
[FIX] sale_automatic_workflow : add missing security rule
sebastienbeau Jul 6, 2012
292253c
[FIX] sale_automatic_workflow : reconciled should be done by the cron…
sebastienbeau Aug 19, 2012
fe905d5
[FIX] sale_automatic_wokflow : fix the option force invoice date, ind…
sebastienbeau Aug 21, 2012
f1cffff
[REF] refactor/clean code due to orm change in 6.1
sebastienbeau Aug 21, 2012
fe029c2
[MERGE] sale_automatic_workflow : merge fix
sebastienbeau Sep 19, 2012
99eb228
[IMP] sale_automatic_workflow : use context manager for intermediary …
sebastienbeau Oct 16, 2012
fefbdf8
[IMP] sale_automatic_workflow : add doc string for commit_now and set…
sebastienbeau Oct 16, 2012
f6d8c47
Ir.cron protected by a noupdate flag.
Oct 19, 2012
7bae3fd
[IMP] sale_automatic_workflow : invoice validation and reconciliation…
sebastienbeau Nov 1, 2012
ad5abee
[REF] import the commit_now from framework_helpers as it have been ex…
sebastienbeau Nov 20, 2012
667519b
[FIX] Open a new cursor before commiting it, thanks to Guewen ideas
sebastienbeau Nov 21, 2012
0e69e25
[IMP] set correctly the version number 6.1.X
sebastienbeau Nov 21, 2012
80f032a
[IMP] sale_automatic_workflow: improve invoice reconciliation by supp…
sebastienbeau Dec 24, 2012
15a03ed
[MIGR] sale_automatic_workflow: move code in the correct file
sebastienbeau Dec 26, 2012
dca55ab
[MIGR] sale_automatic_workflow: migration module to V7
sebastienbeau Dec 26, 2012
a782f2d
[FIX] sale_automatic_workflow: replace dependencies on sale_quick_pay…
guewen Mar 26, 2013
3f4a9c7
[IMP] sale_automatic_worflow: reconcile with the move lines instead o…
guewen Mar 26, 2013
0f7fe0a
[IMP] sale_automatic_workflow: review
guewen Mar 27, 2013
fd13fb9
[FIX] since openerp 7, the crons callee have their own cr, so we don'…
guewen Mar 27, 2013
ca9857c
[IMP] review the workflow job, get rid of the framework helpers depen…
guewen Mar 27, 2013
f719a6e
[FIX] remove the field 'validate_manufactoring_order', not implemente…
guewen Mar 27, 2013
8fc6248
[IMP] use an onchange to apply the default values (connectors will ha…
guewen Mar 27, 2013
2ba6384
[FIX] rename onchange_workflow_process to onchange_workflow_process_id
guewen Mar 27, 2013
8b580fc
[IMP] sale_automatic_workflow: use the same words than openerp for or…
guewen Mar 27, 2013
aa7a560
[IMP] sale_automatic_workflow: display the workflow below the payment…
guewen Mar 27, 2013
bfde4e9
[IMP] sale_automatic_workflow: the onchange apply the workflow
guewen Mar 27, 2013
5eb53a0
[FIX] forbid the unlink of a workflow used by a sale order
guewen Mar 27, 2013
86646fe
[REF] sale_automatic_workflow: remove the field 'days_before_cancel',…
guewen Mar 27, 2013
5008308
[CHG] sale_automatic_workflow: 'validate_order' is now a boolean, bec…
guewen Mar 27, 2013
710a2a3
[FIX] noupdate on the automatic workflow
guewen Mar 27, 2013
be1441b
[FIX] the workflow_process_id is not transferred to picking, due to a…
guewen Mar 27, 2013
7d294c7
[ADD] sale_automatic_workflow: automatic validation of sales orders a…
guewen Mar 27, 2013
ad75681
[IMP] better field descriptions (respect the sale order ones) and cha…
guewen Apr 3, 2013
379177e
[FIX] _prepare_invoice is called on stock.picking and not on stock.pi…
guewen Apr 3, 2013
b48220a
[IMP] rename Sale Workflow Method to Automatic Workflow
guewen Apr 11, 2013
43a7df6
[FIX] updated base data according to last change and addded a manual …
guewen Apr 17, 2013
8793ab6
[FIX] do not activate force invoice date in the base workflows
guewen Apr 17, 2013
15c2831
[ADD] sale_automatic_workflow: french translation
guewen May 2, 2013
ded8e74
[FIX] when a sale order is in exception we should stop to try to vali…
sebastienbeau Sep 1, 2013
79cca0d
[FIX] use explicit relative import, use standard orm.Model
guewen Sep 25, 2013
fba0ac2
[FIX] the exception variable (e) is not used
guewen Sep 25, 2013
00f223c
[ADD] authorship
guewen Sep 25, 2013
738a255
[FIX] unused import
guewen Sep 25, 2013
aa9a010
[CHG] use isinstance rather than hasattr
guewen Sep 25, 2013
f969802
[IMP] docstring of sale.workflow.process
guewen Sep 25, 2013
1dd18e4
[FIX] fr_FR.po files not loaded, should be named fr.po
guewen Sep 25, 2013
a537c0b
[REF] adapte sale_automatic_workflow due to the change as sale order …
sebastienbeau Oct 13, 2013
e8e8d24
[IMP] sle_automatic_workflow : add partial reconciliation
sebastienbeau Oct 13, 2013
606a8f1
[ADD] Camptocamp as author alongside Akretion
guewen Oct 30, 2013
4fd941b
[FIX] remove dependency on sale_exception and give the posibility to …
sebastienbeau Oct 30, 2013
623ccdc
[MRG] from master
guewen Nov 4, 2013
0be193a
[FIX] remove dependency on sale_exception and give the posibility to …
sebastienbeau Nov 4, 2013
ba1670d
[IMP] the option to create an invoice now allows to choose if it is c…
guewen Apr 17, 2013
b6fdcdb
[FIX] missing argument in _get_sum_... methods, sale_order.payment_id…
guewen Jan 15, 2014
ad0ece7
use method to get the move lines
guewen Jan 16, 2014
43da0a6
Tranlations es for modules
albertofl Jun 24, 2014
39167fd
set the flag 'installable' to False on the modules
guewen Jul 7, 2014
f54dd5e
move modules to migrate in __unported__
guewen Jul 7, 2014
469ee6a
Fix flake8 errors
guewen Jul 7, 2014
bee7a7b
Shorten long lines with > 79 chars
guewen Aug 22, 2014
d3ff346
Remaining long lines in sale_automatic_workflow/__init__.py
guewen Aug 22, 2014
78fbb20
[ADD] display a warning related to a wkfl process
rdeheele Oct 17, 2014
9d65741
[UPD] updates help on warning field
rdeheele Oct 17, 2014
51feec1
String statement has no effect: move the docstring above the imports
guewen Nov 20, 2014
8eb0cd5
Merge 7.0 into 8.0
guewen Nov 20, 2014
ec6b856
Move sale_automatic_workflow from __unported__ to root folder
guewen Nov 20, 2014
fcbe942
Set sale_automatic_workflow to installable
guewen Nov 20, 2014
9eac95a
Extract module's description in README.rst
guewen Nov 20, 2014
463162e
Remove dependency on sale_payment_method
guewen Nov 20, 2014
796d291
Remove changes to the model payment.method
guewen Nov 20, 2014
721e2b1
Remove what depends on sale_payment_method
guewen Nov 20, 2014
fedf55f
Started to implement a test
guewen Nov 20, 2014
f26799c
stock.picking.out has passed away and methods have changed
guewen Nov 20, 2014
e4ce5ad
Add a page for the Automation information
guewen Nov 20, 2014
b2406eb
Deprecated comment
guewen Nov 20, 2014
fa04355
Test fails on the last assert
guewen Nov 20, 2014
4183e82
Check if invoice is generated and opened
guewen Nov 20, 2014
0bdf16d
Propagate the workflow to the picking
guewen Nov 20, 2014
8a900c8
New API for sale.workflow.process
guewen Nov 20, 2014
c025f41
New api account.invoice
guewen Nov 20, 2014
38509e4
New API for sale.order
guewen Nov 21, 2014
9587b25
New API for stock.picking
guewen Nov 21, 2014
199fcd6
Rename stock.py to stock_picking.py
guewen Nov 21, 2014
6f965bb
remove dead xml
guewen Nov 21, 2014
478e9fd
New api for automatic.workflow.job
guewen Nov 21, 2014
525ddc9
Add tests for propagation of date and workflow
guewen Nov 24, 2014
5f205a2
Put fields in groups so the labels are displayed
guewen Nov 24, 2014
27125f4
Updated pot and fr.po
guewen Nov 24, 2014
3376a2f
Unused import
guewen Nov 24, 2014
a887e78
Typo, added an uppercase
guewen Dec 17, 2014
fd1c5e6
Do not propagate sale sale automatic workflow when several orders are…
guewen Feb 11, 2015
a638e9e
Add OCA as author of OCA addons
gurneyalex Mar 2, 2015
fc0dc18
[FIX] change called method to confirm sale orders
bguillot Mar 14, 2015
51148a1
Merge pull request #32 from guewen/8.0-sale_automatic_worflow-many-so
pedrobaeza Jun 1, 2015
e5f169b
Add missing default oca icons
yvaucher Aug 18, 2015
3d3b0f9
[IMP] add relation to sales team
damdam-s Aug 31, 2015
c02b620
[IMP] add group base.group_multi_salesteams on 'section_id' fields in…
damdam-s Aug 31, 2015
4ae6c83
[UPD] prefix versions with 8.0
sbidoul Oct 9, 2015
541bbaa
OCA Transbot updated translations from Transifex
oca-transbot Dec 5, 2015
2cf296e
OCA Transbot updated translations from Transifex
oca-transbot Dec 20, 2015
b1d1436
sale_automatic_workflow : create invoice for sale with only product s…
Dec 28, 2015
b48fda0
OCA Transbot updated translations from Transifex
oca-transbot Jan 10, 2016
e4b0d8d
Merge pull request #254 from acsone/8.0-sale_automatic_workflow_creat…
pedrobaeza Mar 2, 2016
5bc41d7
sale_automatic_workflow : add default journal on workflow process
Dec 17, 2015
157a163
OCA Transbot updated translations from Transifex
oca-transbot Mar 13, 2016
4490693
Merge branch '8.0-extract' into 9.0-sale_automatic_workflow
atchuthan Apr 22, 2016
80fcfcb
[WIP] : Automated Workflows
xavier-dass Apr 28, 2016
4bce919
[FIX] fixed conventions
atchuthan May 6, 2016
b23c2e2
[FIX] modified data file
atchuthan May 9, 2016
0760eb4
[FIX] corrections and modified test
atchuthan May 9, 2016
ffbfb6a
[FIX] modified filter usage
atchuthan May 10, 2016
218f900
[FIX] modified filter usage
atchuthan May 11, 2016
061300d
[FIX] separated payment portion
atchuthan May 12, 2016
a41b0db
[FIX] corrections
atchuthan May 12, 2016
e08a7ac
[MVD] moved payment filter to sale_automatic_workflow_payment_mode
atchuthan May 30, 2016
7a2414c
Fix default filters
guewen Jun 13, 2016
ca9257c
Merge pull request #1 from guewen/sodexis-9.0-sale_automatic_workflow
atchuthan Jun 14, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
79 changes: 79 additions & 0 deletions sale_automatic_workflow/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3

=======================
Sale Automatic Workflow
=======================

Create workflows with more or less automatization and apply it on sales
orders.

A workflow can:

- Apply default values:
* Packing Policy (partial, complete)
* Shipping Policy (prepaid, manual, postpaid, picking)
* Invoice On (ordered quantities, shipped quantities)
* Set the invoice's date to the sale order's date
* Set a sales team

- Apply automatic actions:
* Validate the order (only if paid, always, never)
* Create an invoice
* Validate the invoice
* Confirm the picking

This module is used by Magentoerpconnect and Prestashoperpconnect.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pedrobaeza @sergio-teruel take a look for Prestashoperpconnect

It is well suited for other E-Commerce connectors as well.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


Usage
=====

To use this module, you need to:

.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
:alt: Try me on Runbot
:target: https://runbot.odoo-community.org/runbot/167/9.0

Bug Tracker
===========

Bugs are tracked on `GitHub Issues
<https://github.com/OCA/sale-workflow/issues>`_. In case of trouble, please
check there if your issue has already been reported. If you spotted it first,
help us smashing it by providing a detailed and welcomed feedback.

Credits
=======

Images
------

* Odoo Community Association: `Icon <https://github.com/OCA/maintainer-tools/blob/master/template/module/static/description/icon.svg>`_.

Contributors
------------

* Guewen Baconnier
* Beau Sebastien
* Leonardo Pistone
* Stéphane Bidoul
* Damien Crier
* Alexandre Fayolle
* Sodexis

Maintainer
----------

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

This module is maintained by the OCA.

OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.

To contribute to this module, please visit https://odoo-community.org.
7 changes: 7 additions & 0 deletions sale_automatic_workflow/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# -*- coding: utf-8 -*-
# © 2011 Akretion Sébastien BEAU <sebastien.beau@akretion.com>
# © 2013 Camptocamp SA (author: Guewen Baconnier)
# © 2016 Sodexis
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from . import models
22 changes: 22 additions & 0 deletions sale_automatic_workflow/__openerp__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# -*- coding: utf-8 -*-
# © 2011 Akretion Sébastien BEAU <sebastien.beau@akretion.com>
# © 2013 Camptocamp SA (author: Guewen Baconnier)
# © 2016 Sodexis
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

{
'name': 'Sale Automatic Workflow',
'version': '9.0.1.0.0',
'category': 'Sales Management',
'license': 'AGPL-3',
'author': "Akretion,Camptocamp,Sodexis,Odoo Community Association (OCA)",
'website': 'http://www.akretion.com/',
'depends': ['sale_stock', 'sales_team',
],
'data': ['views/sale_view.xml',
'views/sale_workflow_process_view.xml',
'data/automatic_workflow_data.xml',
'security/ir.model.access.csv',
],
'installable': True,
}
90 changes: 90 additions & 0 deletions sale_automatic_workflow/data/automatic_workflow_data.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
sale_automatic_workflow for OpenERP
Copyright (C) 2011 Akretion Sébastien BEAU <sebastien.beau@akretion.com>
The licence is in the file __openerp__.py
-->

<odoo>
<data noupdate="1">

<record id="automatic_workflow_order_filter" model="ir.filters">
<field name="name">Automatic Workflow Order Filter</field>
<field name="model_id">sale.order</field>
<field name="domain">[('state', '=', 'draft')]</field>
<field name="user_id" ref="base.user_root"/>
</record>

<record id="automatic_workflow_picking_filter" model="ir.filters">
<field name="name">Automatic Workflow Picking Filter</field>
<field name="model_id">stock.picking</field>
<field name="domain">[('state', 'in', ['draft', 'confirmed', 'assigned'])]</field>
<field name="user_id" ref="base.user_root"/>
</record>

<record id="automatic_workflow_create_invoice_filter" model="ir.filters">
<field name="name">Automatic Workflow Create Invoice Filter</field>
<field name="model_id">sale.order</field>
<field name="domain">[('state','in',['sale','done']),('invoice_status','=','to invoice')]</field>
<field name="user_id" ref="base.user_root"/>
</record>

<record id="automatic_workflow_validate_invoice_filter" model="ir.filters">
<field name="name">Automatic Workflow Validate Invoice Filter</field>
<field name="model_id">account.invoice</field>
<field name="domain">[('state', '=', 'draft')]</field>
<field name="user_id" ref="base.user_root"/>
</record>

<record id="automatic_workflow_sale_done_filter" model="ir.filters">
<field name="name">Automatic Workflow Sale Done Filter</field>
<field name="model_id">sale.order</field>
<field name="domain">[('state', '=', 'sale'),('invoice_status','=','invoiced')]</field>
<field name="user_id" ref="base.user_root"/>
</record>

<record id="automatic_validation" model="sale.workflow.process">
<field name="name">Automatic</field>
<field name="picking_policy">one</field>
<field name="validate_order" eval="1"/>
<field name="order_filter_id" eval="automatic_workflow_order_filter"/>
<field name="create_invoice" eval="1" />
<field name="create_invoice_filter_id" eval="automatic_workflow_create_invoice_filter"/>
<field name="validate_invoice" eval="1" />
<field name="validate_invoice_filter_id" eval="automatic_workflow_validate_invoice_filter"/>
<field name="invoice_date_is_order_date" eval="0" />
<field name="validate_picking" eval="1" />
<field name="picking_filter_id" eval="automatic_workflow_picking_filter"/>
<field name="sale_done" eval="0"/>
<field name="sale_done_filter_id" eval="automatic_workflow_sale_done_filter"/>
<field name="warning">Be careful, if you save the order with this setting, it could be auto-confirmed, even if you are editing it.</field>
</record>

<record id="manual_validation" model="sale.workflow.process">
<field name="name">Manual</field>
<field name="picking_policy">one</field>
<field name="validate_order" eval="0"/>
<field name="validate_invoice" eval="0" />
<field name="invoice_date_is_order_date" eval="0" />
<field name="validate_picking" eval="0" />
<field name="order_filter_id" eval="automatic_workflow_order_filter"/>
<field name="create_invoice_filter_id" eval="automatic_workflow_create_invoice_filter"/>
<field name="validate_invoice_filter_id" eval="automatic_workflow_validate_invoice_filter"/>
<field name="picking_filter_id" eval="automatic_workflow_picking_filter"/>
<field name="sale_done_filter_id" eval="automatic_workflow_sale_done_filter"/>
</record>

<record forcecreate="True" id="ir_cron_automatic_workflow_job" model="ir.cron">
<field name="name">Automatic Workflow Job</field>
<field eval="True" name="active"/>
<field name="user_id" ref="base.user_root"/>
<field name="interval_number">1</field>
<field name="interval_type">minutes</field>
<field name="numbercall">-1</field>
<field eval="False" name="doall"/>
<field eval="'automatic.workflow.job'" name="model"/>
<field eval="'run'" name="function"/>
<field eval="'()'" name="args"/>
</record>
</data>
</odoo>
Loading