[ADD] create `project_name_from_quote` add-on

This commit is contained in:
Stéphan Sainléger
2022-09-15 16:08:54 +02:00
parent 11d99ae6e0
commit 139e451d0c
6 changed files with 110 additions and 0 deletions

2
project_name_from_quote/.gitignore vendored Normal file
View File

@@ -0,0 +1,2 @@
*.*~
*pyc

View File

@@ -0,0 +1,57 @@
=======================
project_name_from_quote
=======================
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Faccount--analytic-lightgray.png?logo=github
:target: https://github.com/elabore-coop/project-tools
:alt: elabore/hr-tools
|badge1| |badge2| |badge3|
This module tranfers the Quote / Sale order title to the project name.
Installation
============
Use Odoo normal module installation procedure to install ``project_name_from_quote``.
Known issues / Roadmap
======================
None yet.
Bug Tracker
===========
Bugs are tracked on `our issues website <https://github.com/elabore-coop/project-tools/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
=======
Contributors
------------
* Stéphan Sainléger
Funders
-------
The development of this module has been financially supported by:
* Elabore (https://elabore.coop)
* Datactivist (https://datactivist.coop)
Maintainer
----------
This module is maintained by Elabore.

View File

@@ -0,0 +1,3 @@
# -*- coding: utf-8 -*-
from . import models

View File

@@ -0,0 +1,36 @@
# Copyright 2022 Stéphan Sainléger (Elabore)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "project_name_from_quote",
"version": "14.0.1.0.0",
"author": "Elabore",
"website": "https://elabore.coop",
"maintainer": "Stéphan Sainléger",
"license": "AGPL-3",
"category": "Tools",
"summary": "Use quote name as project name",
# any module necessary for this one to work correctly
"depends": [
"base",
"sale_project",
"account_quotation_sale_order_invoice_title",
],
"qweb": [
# "static/src/xml/*.xml",
],
"external_dependencies": {
"python": [],
},
# always loaded
"data": [],
# only loaded in demonstration mode
"demo": [],
"js": [],
"css": [],
"installable": True,
# Install this module automatically if all dependency have been previously
# and independently installed. Used for synergetic or glue modules.
"auto_install": False,
"application": False,
}

View File

@@ -0,0 +1 @@
from . import sale_order

View File

@@ -0,0 +1,11 @@
from typing import ValuesView
from odoo import models
class SaleOrderLine(models.Model):
_inherit = "sale.order.line"
def _timesheet_create_project_prepare_values(self):
values = super(SaleOrderLine, self)._timesheet_create_project_prepare_values()
values["name"] = self.order_id.so_title
return values