Commit Graph
47 Commits
Author SHA1 Message Date
Denis Ledoux b4a7996e96 [IMP] base, *: change the API of init hooks to pass env
This is mostly a cleaning/refactoring change.

The current API for init hooks (pre, post, uninstall) is to pass
`cr, registry`.
But the first thing which was done by most
post init and uninstall hooks was to create an env using
the cr passed
e.g.
`env = api.Environment(cr, SUPERUSER_ID, {})`
and the `registry` argument was unused in all these hooks,
completely.

By changing the API of hooks to pass `env` instead
of `cr, registry`, we gain in average two lines in every
hooks:
- the line creating the env `env = api.Environment(cr, SUPERUSER_ID, {})`
- the line importing `api` and `SUPERUSER_ID`

Therefore removing ~250 lines of repeated code lines accross odoo/odoo and
odoo/enterprise.
In addition to these lines removed,
it also ease the API of init hooks for Odoo developers,
who are used to that `env` and not so much how to create an `env`
from a cursor.

Part-of: odoo/odoo#108254
2023-02-01 10:25:01 +01:00
Thibault Francois 2daa9a1673 [FIX] sale: send invoice only when ready to be send
Issues
------

In the module sale, with the automatic invoicing configured.
Payment transaction generate, post and send the invoice when
they are post process.

In some country the invoice is not directly ready to be sent
due to some edi document

Solution
--------

use the mechanism introduce with https://github.com/odoo/odoo/commit/3a29371eb70309f46e3b8938434287fefc23b351
to delay the sending. Introduce a cron that check invoice to send

closes odoo/odoo#81526

X-original-commit: 97b74d8304337d901d9422418cbd0dcdcc46fcf5
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2021-12-22 14:02:37 +00:00
Rémy Voet (ryv)andFeyensv eca2161f40 [IMP] sale: add populate
Add populate script for the `sale.order` and `sale.order.line`.

task-2446266
closes odoo/odoo#50566

closes odoo/odoo#68704

Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
Co-authored-by: Feyensv <vfe@odoo.com>
2021-04-29 09:28:39 +00:00
qmo-odoo 1da63f0ab0 [IMP] salesteam: Simplify sales team config and improved team dashboard
Reason:
  *Sales team configuration is too complex with fields you
   don't understand and that bring no added value
  *Remove the team type, every team should be able to handle
   a POS or a website for example
Contains:
  *Removal of the team_type, use_quotations, use_leads fields
  *Removal of the graph configuration fields
  *Adapting the filters that were based on the team_type
  *Clear distinction between the team dashboard behavior in crm
   from the one in sales
  *Cleansing of now dead code due to the removal of the previously
   mentionned fields

Task: #1830105
Enterprise PR: #3006
Closes: #28063
2018-12-05 15:32:53 +00:00
Adrian Torres 84b6c46943 [FIX] registry, loading: re-init inherited SQL views
Before this commit:

* Install any module that creates a SQL view and another that extends
this view.
    e.g.: sale and pos_sale for `report.all.channels.sales`.

* Uninstall the module that extended the SQL view.
    e.g.: uninstall pos_sale.

* Try to access the view from the web client -> Traceback, table not
found.

This happens because when reloading the registry, postgres drops the sql
view and it must be re-initialized.

After this commit:

We solve this issue by calculating all missing tables/views during the
uninstallation process, and re-initializing all of them right before
reloading the registry.

Also remove sql-view hacks in the modules `sale` and `sale_margin`.

Fixes #23528, #23529, #23530
2018-03-13 09:41:43 +01:00
Swapnesh Shah 1697ccc183 [FIX] sale: Re-init account.invoice.report view only if it exists
Uninstalling account gets rid of this view and since sale depends on account, it is uninstalled as well, which triggers the uninstall_hook.

Closes #23446
2018-03-05 09:15:53 +01:00
Adrian Torres 517b1d1faf [FIX] sale: re-init account.invoice.report view (#23286)
* Install sale_management, contacts
* Uninstall sale (not sale_management)
* Try to access any partner via contacts
    -> BOOM, traceback: relation account_invoice_report does not exist

For some reason, uninstalling `sale` drops the SQL view for
account.invoice.report which in turn means that anything that requires
the view will break, this was the case for accessing the res_partner
form view.

Fixes #23270 by forcing account.invoice.report.init() upon
uninstallation of the `sale` module.
2018-02-23 16:06:03 +01:00
Christophe Simonis 10128fa7e8 [MERGE] forward port branch saas-16 up to dc2a6c6cd2 2017-10-20 19:27:04 +02:00
Christophe Simonis 5ea0f55d65 [MERGE] forward port branch saas-15 up to bee0c11ef7 2017-10-20 17:57:21 +02:00
Christophe Simonis beed2d2ed9 [IMP] sale{,_stock}: do not mix indentation with tabs & spaces 2017-10-19 23:35:00 +02:00
Thibault Delavallée 9381334f6e [MOV] sale_*: move sale customer portal to sale
Customer portal is now a feature coming directly with sale module. As
it uses a simple website renderer customization and advanced website
features are not available and depends on having website module
installed.
2017-08-08 15:36:25 +02:00
Christophe Simonis 780ae8a808 [MERGE] forward port branch saas-15 up to 10cb34bcac 2017-07-04 18:14:13 +02:00
Goffin Simon a8c12e1fd0 [FIX] sale: Updating dashboard_graph_model when uninstalling Sales
Uninstalling Sales with CRM still installed lead to an error
when clicking on CRM app because the dashboard_graph_model was not
updated for each crm.team record.

opw:748099
2017-06-27 14:02:05 +02:00
xmo-odoo b4429c2a91 [FIX] Various P3-related import changes
* LDAP import: python-ldap is not python3-compatible, pyldap is

  Warning: only supported from debian Stretch (current testing)?
  https://packages.debian.org/search?searchon=names&keywords=pyldap

* implicitly relative imports
* imports of moved or removed stdlib modules

issue #8530
2017-04-28 09:06:53 +02:00
fwi-odoo a33e808ca6 [MOV] sale: re-organise directory structure according to new API guidelines 2016-08-10 11:00:21 +02:00
Julien Louette a6b240b6bc [ADD] sale: merged sale_layout into sale 2016-03-25 11:34:25 +01:00
Nicolas Martinelli 94716a3f14 [IMP] sale: adaptation due to the new Sale module
Invoicing is now completely handled from the SO.
cf. documentation

Reason: complete rewrite of the Sale module.

Responsible: fp, dbo, nim
2015-08-27 19:19:36 +02:00
Olivier Dony 0bd4545348 [LEGAL] Use global LICENSE/COPYRIGHT files, remove boilerplate text
- Preserved explicit 3rd-party copyright notices
- Explicit boilerplate should not be necessary - copyright law applies
  automatically in all countries thanks to Berne Convention + WTO rules,
  and a reference to the applicable license is clear enough.
2015-06-02 03:16:04 +02:00
qdp-odoo c04065abd8 [IMP] accounting v9. Yeeeeaah 2015-05-05 17:28:04 +02:00
Thibault Delavallée 3406b6db39 [CLEAN] sale, sale_crm: cleaning before merging. Cleaned calculation
of default section id + removed duplicated code.
2014-05-12 14:56:01 +02:00
Prashant Panchal (OpenERP) e511de45cb [ADD]crm_case_section (view & py file) add in sale module, that file split from sale.py & sale_view.xml 2014-05-07 11:50:06 +05:30
Atul Patel (OpenERP) 06c0ead10d [ADD]: Add dependency
ii) move wizard , yaml file
iii) move stock method into sale_stock.
iv) add security into sale_stock module.

bzr revid: atp@tinyerp.com-20120726205659-xiyx39r3dibshyjs
2012-07-27 02:26:59 +05:30
DBR (OpenERP) d9c305ef06 [ADD,IMP] sale,crm:
added:
  sale/res_partner.py
  sale/res_partner_view.xml
modified:
  crm/res_partner.py
  crm/res_partner_view.xml
  sale/__init__.py
  sale/__openerp__.py
  stock/product.py
  stock/product_view.xml
  stock/static/src/css/stock.css
For set links off quatations,opportunity and meeting

bzr revid: dbr@tinyerp.com-20120426103133-l0uc091e9r7mbu9b
2012-04-26 16:01:33 +05:30
Ujjvala Collins (OpenERP) adc65d5cfa [IMP]: Improved code: added functionality to the respected modules. Added get and set methods.
bzr revid: uco@tinyerp.com-20120229095021-ogpd1s4nyxa7wdns
2012-02-29 15:20:21 +05:30
Olivier Dony 3bffe65b2c [MERGE] sync with latest trunk
bzr revid: odo@openerp.com-20111013170327-9rvfdkbgj01hdgxb
2011-10-13 19:03:27 +02:00
Olivier Dony 888a44aa63 [IMP] sale: reviewed/cleanedup edi + auto-email notifications
bzr revid: odo@openerp.com-20111006113213-qm7tb1c39fs4nqep
2011-10-06 13:32:13 +02:00
Olivier Dony 49ee09b8ce [REM] sale,purchase: temporarily disable EDI until reviewed
bzr revid: odo@openerp.com-20111005003504-nqo2wm2313dfxvc3
2011-10-05 02:35:04 +02:00
Stephane Wirtel 57911141bc [IMP] Move all installers into base_setup
bzr revid: stw@openerp.com-20110926164323-ob28bw1zgfmaih9c
2011-09-26 18:43:23 +02:00
Hardik Ansodariy (OpenERP) 333b5aa3e2 [IMP] edi sale order with email template
bzr revid: han@tinyerp.com-20110826130929-q0n8o9gdy8a6ssf0
2011-08-26 18:39:29 +05:30
Fabien Pinckaers 098b92a207 [IMP] removed pricelist_sale & pricelist_purchase
bzr revid: fp@tinyerp.com-20101210155634-u44ao84d1prge4cx
2010-12-10 16:56:34 +01:00
MTR(OpenERP) 3a87abb72e [IMP] Sale: Code Improved
bzr revid: mra@mra-laptop-20100818062259-8qi7bfpuk9wt7f4z
2010-08-18 11:52:59 +05:30
uco (Open ERP) d91e074b52 [REM] profile_manufacturing: Removed module.
[ADD] sale: Added installer files for sales management modules.

bzr revid: uco@tinyerp.com-20100726094715-ky600vwg8ghg0h7u
2010-07-26 15:17:15 +05:30
uco (OpenERP) c45aa850a7 [IMP] mrp, sale: Task ID-819: * sale/mrp.py should be removed. * sale_name and sale_ref fields should be removed.
bzr revid: uco@tinyerp.com-20100527132108-vlm1ijypkt9wwto1
2010-05-27 18:51:08 +05:30
uco (OpenERP) 0479ed81bc [ADD] mrp, mrp_procurement: Task ID-574: Remove mrp.procurement from the MRP module. Separated mrp.procurment object into new module mrp_procurement.
bzr revid: uco@tinyerp.co.in-20100429133007-ut53koctlffi8g2a
2010-04-29 19:00:07 +05:30
apa-tiny 71eda1fdf7 [MOVE/REM]:moved the sale_report.py and sale_report_view.xml in report folder and also removed report_sale_view.xml(No needed.).
bzr revid: apa@tinyerp.com-20100312113610-er7p4r52anuh8phq
2010-03-12 17:06:10 +05:30
Fabien Pinckaers d3b6294546 [IMP] adding a report for sale module
bzr revid: fp@tinyerp.com-20100301212850-ox7dn1vo33jliavq
2010-03-01 22:28:50 +01:00
Stephane Wirtel fb3ef7a2f4 [FIX] Change the year of the copyright
bzr revid: stephane@openerp.com-20100112091839-a6p7tenhb4e4zxyx
2010-01-12 10:18:39 +01:00
PSO(OpenERP) eb0b928cc0 Changed licencing terms
bzr revid: hda@tinyerp.com-20091014111534-1vtk21rz8byhszzf
2009-10-14 16:45:34 +05:30
ChristopheChauvet(syleam) 41e8ed59ef changed encoding to coding in all py files
lp bug: https://launchpad.net/bugs/357182 fixed

bzr revid: hda@tinyerp.com-20091013055837-3ntnbe8b938xmk97
2009-10-13 11:28:37 +05:30
HDA (OpenERP) 7d3a5b51ba [Merged] stable and trunk addons
bzr revid: hda@tinyerp.com-20090924104621-7p53erkfs9xa0bev
2009-09-24 16:16:21 +05:30
Stephane Wirtel 21f104a506 [IMP] Update the copyright to 2009
bzr revid: stephane@tinyerp.com-20090104221250-55q32ayj2t8kzb2k
2009-01-04 23:12:50 +01:00
Fabien Pinckaers 66b97cdc41 removed_unused_file
bzr revid: fp@tinyerp.com-20081208114814-rus1b6tfqfdj7xac
2008-12-08 12:48:14 +01:00
Christophe Simonis f5fad0ba30 passing modules in GPL-3
bzr revid: christophe@tinyerp.com-20081103191856-jhcivvwb16fvz2os
2008-11-03 20:18:56 +01:00
hda@tinyerp.com d286f601cb Added pricelists on product form
bzr revid: hda@tinyerp.com-20080925112734-3cu3io9c1de22em0
2008-09-25 16:57:34 +05:30
Christophe Simonis 3e3d897e88 add encoding comment and vim comment
bzr revid: christophe@tinyerp.com-20080723144147-77o5t9adx26a84lt
2008-07-23 16:41:47 +02:00
stw 0feb782c6a add Copyright and GPL license into the Header of Python files
bzr revid: stw-d9a6d631f7cfdab5a120a6b0104ce2dbf8644841
2008-06-16 11:00:21 +00:00
pinky a83dce15e0 New trunk
bzr revid: pinky-dedd7f8a42bd4557112a0513082691b8590ad6cc
2006-12-07 13:41:40 +00:00