From 25b07ac28589e9004229f2ec8b2a1be9b5ed570f Mon Sep 17 00:00:00 2001 From: brian10048 Date: Wed, 20 Nov 2019 15:24:04 -0500 Subject: [PATCH 01/35] [ADD] fieldservice_sale_stock --- fieldservice_sale_stock/README.rst | 141 +++++ fieldservice_sale_stock/__init__.py | 4 + fieldservice_sale_stock/__manifest__.py | 23 + fieldservice_sale_stock/models/__init__.py | 6 + fieldservice_sale_stock/models/sale_order.py | 25 + fieldservice_sale_stock/readme/CONFIGURE.rst | 7 + .../readme/CONTRIBUTORS.rst | 1 + .../readme/DESCRIPTION.rst | 2 + fieldservice_sale_stock/readme/INSTALL.rst | 4 + fieldservice_sale_stock/readme/ROADMAP.rst | 2 + fieldservice_sale_stock/readme/USAGE.rst | 8 + .../static/description/icon.png | Bin 0 -> 17808 bytes .../static/description/index.html | 480 ++++++++++++++++++ 13 files changed, 703 insertions(+) create mode 100644 fieldservice_sale_stock/README.rst create mode 100644 fieldservice_sale_stock/__init__.py create mode 100644 fieldservice_sale_stock/__manifest__.py create mode 100644 fieldservice_sale_stock/models/__init__.py create mode 100644 fieldservice_sale_stock/models/sale_order.py create mode 100644 fieldservice_sale_stock/readme/CONFIGURE.rst create mode 100644 fieldservice_sale_stock/readme/CONTRIBUTORS.rst create mode 100644 fieldservice_sale_stock/readme/DESCRIPTION.rst create mode 100644 fieldservice_sale_stock/readme/INSTALL.rst create mode 100644 fieldservice_sale_stock/readme/ROADMAP.rst create mode 100644 fieldservice_sale_stock/readme/USAGE.rst create mode 100644 fieldservice_sale_stock/static/description/icon.png create mode 100644 fieldservice_sale_stock/static/description/index.html diff --git a/fieldservice_sale_stock/README.rst b/fieldservice_sale_stock/README.rst new file mode 100644 index 0000000000..9bf6f8719e --- /dev/null +++ b/fieldservice_sale_stock/README.rst @@ -0,0 +1,141 @@ +===================== +Field Service - Sales +===================== + +.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |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%2Ffield--service-lightgray.png?logo=github + :target: https://github.com/OCA/field-service/tree/12.0/fieldservice_sale + :alt: OCA/field-service +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/field-service-12-0/field-service-12-0-fieldservice_sale + :alt: Translate me on Weblate +.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png + :target: https://runbot.odoo-community.org/runbot/264/12.0 + :alt: Try me on Runbot + +|badge1| |badge2| |badge3| |badge4| |badge5| + +The module integrates the Field Service application with the Sales one and +allows you to sell field service products. + +**Table of contents** + +.. contents:: + :local: + +Installation +============ + +To install Field Service and have the mapping features, you need to install GeoEngine. + +Please refer to the installation instructions available at: +https://github.com/OCA/geospatial/tree/12.0/base_geoengine + +Configuration +============= + +To setup a product for quoting and selling field service orders: + +* Go to Sales > Catalog > Products +* Create or select a product +* Set the Product Type to 'Service' under General Information tab +* Under Invoicing tab, set the Field Service Tracking option +* Select the FSM Order Template that will be used for creating FSM Orders when + a Sale Order is confirmed with this product + +To setup a sales territory: + +* Go to Field Service > Master Data > Locations +* Create or select a location +* Go to the Sales tab and select the sales territory + +Usage +===== + +* Go to Sales +* Create a new Quotation/Sale Order +* Set the FSM Location to be used +* On a Sale Order Line, select a product configured for field service orders +* Confirm the Sale Order +* Field Service orders linked to SO lines are created +* When a Field Service order is completed, the quantity delivered for its + linked sale order line will be updated to the quantity ordered, indicating + this line is ready for invoicing. + +Known issues / Roadmap +====================== + +The roadmap of the Field Service application is documented on +`Github `_. + +Bug Tracker +=========== + +Bugs are tracked on `GitHub 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 `_. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Authors +~~~~~~~ + +* Open Source Integrators + +Contributors +~~~~~~~~~~~~ + +* Open Source Integrators + + * Steve Campbell + * Maxime Chambreuil + * Wolfgang Hall + +* Serpent Consulting Services Pvt. Ltd. +* Brian McMaster +* Raphaël Reverdy + +Maintainers +~~~~~~~~~~~ + +This module is maintained by the OCA. + +.. image:: https://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: https://odoo-community.org + +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. + +.. |maintainer-wolfhall| image:: https://github.com/wolfhall.png?size=40px + :target: https://github.com/wolfhall + :alt: wolfhall +.. |maintainer-max3903| image:: https://github.com/max3903.png?size=40px + :target: https://github.com/max3903 + :alt: max3903 +.. |maintainer-brian10048| image:: https://github.com/brian10048.png?size=40px + :target: https://github.com/brian10048 + :alt: brian10048 + +Current `maintainers `__: + +|maintainer-wolfhall| |maintainer-max3903| |maintainer-brian10048| + +This module is part of the `OCA/field-service `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/fieldservice_sale_stock/__init__.py b/fieldservice_sale_stock/__init__.py new file mode 100644 index 0000000000..c827f99758 --- /dev/null +++ b/fieldservice_sale_stock/__init__.py @@ -0,0 +1,4 @@ +# Copyright (C) 2019 Brian McMaster +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from . import models diff --git a/fieldservice_sale_stock/__manifest__.py b/fieldservice_sale_stock/__manifest__.py new file mode 100644 index 0000000000..5286658789 --- /dev/null +++ b/fieldservice_sale_stock/__manifest__.py @@ -0,0 +1,23 @@ +# Copyright (C) 2019 Brian McMaster +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +{ + 'name': 'Field Service - Sale Stock', + 'version': '12.0.0.1.0', + 'summary': 'Sell stockable items linked to field service orders.', + 'category': 'Field Service', + 'author': 'Brian McMaster, Odoo Community Association (OCA)', + 'website': 'https://github.com/OCA/field-service', + 'depends': [ + 'fieldservice_sale', + 'fieldservice_stock', + ], + 'license': 'AGPL-3', + 'development_status': 'Beta', + 'maintainers': [ + 'wolfhall', + 'max3903', + 'brian10048', + ], + 'installable': True, +} diff --git a/fieldservice_sale_stock/models/__init__.py b/fieldservice_sale_stock/models/__init__.py new file mode 100644 index 0000000000..e02b396f5b --- /dev/null +++ b/fieldservice_sale_stock/models/__init__.py @@ -0,0 +1,6 @@ +# Copyright (C) 2019 Brian McMaster +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from . import ( + sale_order +) diff --git a/fieldservice_sale_stock/models/sale_order.py b/fieldservice_sale_stock/models/sale_order.py new file mode 100644 index 0000000000..e91eefe162 --- /dev/null +++ b/fieldservice_sale_stock/models/sale_order.py @@ -0,0 +1,25 @@ +# Copyright (C) 2019 Brian McMaster +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from odoo import api, models + + +class SaleOrder(models.Model): + _inherit = 'sale.order' + + @api.multi + def _link_pickings_to_fsm(self): + for order in self: + fsm_order = self.env['fsm.order'].search([ + ('sale_id', '=', order.id) + ]) + pickings = order.picking_ids + pickings.write({'fsm_order_id': fsm_order.id}) + + @api.multi + def action_confirm(self): + """ On SO confirmation, link the fsm order on the pickings + created by the sale order """ + result = super().action_confirm() + self._link_pickings_to_fsm() + return result diff --git a/fieldservice_sale_stock/readme/CONFIGURE.rst b/fieldservice_sale_stock/readme/CONFIGURE.rst new file mode 100644 index 0000000000..3efde2018d --- /dev/null +++ b/fieldservice_sale_stock/readme/CONFIGURE.rst @@ -0,0 +1,7 @@ +Configure a storable product that generates a unique field service order for +an individual sale order: + +* Go to Sales > Catalog > Products +* Create or select a product +* Set the type to 'Storable' +* Set the Service Policy to 'Per Sale Order' diff --git a/fieldservice_sale_stock/readme/CONTRIBUTORS.rst b/fieldservice_sale_stock/readme/CONTRIBUTORS.rst new file mode 100644 index 0000000000..39ef3fa3d7 --- /dev/null +++ b/fieldservice_sale_stock/readme/CONTRIBUTORS.rst @@ -0,0 +1 @@ +* Brian McMaster diff --git a/fieldservice_sale_stock/readme/DESCRIPTION.rst b/fieldservice_sale_stock/readme/DESCRIPTION.rst new file mode 100644 index 0000000000..ccb347ff13 --- /dev/null +++ b/fieldservice_sale_stock/readme/DESCRIPTION.rst @@ -0,0 +1,2 @@ +This module links pickings created by a sale order to the field +service order created by the sale order. diff --git a/fieldservice_sale_stock/readme/INSTALL.rst b/fieldservice_sale_stock/readme/INSTALL.rst new file mode 100644 index 0000000000..8571f65376 --- /dev/null +++ b/fieldservice_sale_stock/readme/INSTALL.rst @@ -0,0 +1,4 @@ +To install Field Service and have the mapping features, you need to install GeoEngine. + +Please refer to the installation instructions available at: +https://github.com/OCA/geospatial/tree/12.0/base_geoengine diff --git a/fieldservice_sale_stock/readme/ROADMAP.rst b/fieldservice_sale_stock/readme/ROADMAP.rst new file mode 100644 index 0000000000..f607015959 --- /dev/null +++ b/fieldservice_sale_stock/readme/ROADMAP.rst @@ -0,0 +1,2 @@ +The roadmap of the Field Service application is documented on +`Github `_. diff --git a/fieldservice_sale_stock/readme/USAGE.rst b/fieldservice_sale_stock/readme/USAGE.rst new file mode 100644 index 0000000000..7946d6b88d --- /dev/null +++ b/fieldservice_sale_stock/readme/USAGE.rst @@ -0,0 +1,8 @@ +* Go to Sales +* Create a new Quotation/Sale Order +* Set the FSM Location to be used +* On a Sale Order Line, select a product configured for field service orders +* Confirm the Sale Order +* Field Service orders linked to SO lines are created +* The pickings for storable products will get linked to the newly created + field service order diff --git a/fieldservice_sale_stock/static/description/icon.png b/fieldservice_sale_stock/static/description/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..955674d8f0b8c47de3ffa9db25cb109fbe4a1091 GIT binary patch literal 17808 zcmeHvc;{H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GLf=^SFvU9HfcY#Ud| zgSyJ0D{|rj`Us)=Oqv|Dg`)oYe@o|1j}FMiHs8lsL9rdyo(w(yZ%S%dzL%DAKN|+} z9(_^`2D%ml(K|UWU%sqiSpAHPxB$=vf@EuoC~l#JJ}~40%m2>j zGWwXHJI2OAP%xvDU9Fj)f3zvya2lRc-*b24QTTj4YW{ZA8xplo{PTs)6LjtvE4+oq zO>t&E^fTM;A=cV%8JzPn3PB&kAXl2KhW?Nd85wzJlx#0ijShXJW?6qNFT5WHgX*`4 znAw6(otBnuX*CHI7J32YAFrpeFe*%n?tiX`q=R&agxqy8y^(5Q$_ZB`XM!tI*GZbX z(X#_0LZp6h^6*3~mEHhT0b`4Yup6AXVlpn+Q7tknyZpxvuEohyH{$F=!8mZnEQAjI zQ46(s-Yaz;wNUgv&W5ThKB{W3(9dUm{iObJMRL?`A=vQt%jg)l{#&O4GI+#Kwjew0nySosF+@T>xBYngWHD;bxF;7b-%>cT74(~!j za)0gM!|>0eyS75X+B()YfAk)l$Phu_s10UQ8K<;`o;##M&SgtTuC$&4T{~TLYh~dK zLm$LxbZ^z;{Wl*6GW5?iFeeetYLG-nRdM6TR)K?1<#+hD&;m{|(ME|BrHBci#pV0oF(@prIFR=LEDdC|` z$6e@>ZBk~p1x{c}1ap=W1^2W?Z=AMy=;mO76+#5-nyl4XmK<5P7YCL|M_(NIF>`>^ z*RLK*lO8nwDMbFyjM$-Z6Jc-2q&bOb^^g1dhQG`X-*=g!K5kpSk08tH`uba$AEu(3 gUHh>HCdQ7*k1fAW1vhU(MTsEtw^U^Fq)ngxAO8EYHUIzs literal 0 HcmV?d00001 diff --git a/fieldservice_sale_stock/static/description/index.html b/fieldservice_sale_stock/static/description/index.html new file mode 100644 index 0000000000..ae8d6fe6d4 --- /dev/null +++ b/fieldservice_sale_stock/static/description/index.html @@ -0,0 +1,480 @@ + + + + + + +Field Service - Sales + + + +
+

Field Service - Sales

+ + +

Beta License: AGPL-3 OCA/field-service Translate me on Weblate Try me on Runbot

+

The module integrates the Field Service application with the Sales one and +allows you to sell field service products.

+

Table of contents

+ +
+

Installation

+

To install Field Service and have the mapping features, you need to install GeoEngine.

+

Please refer to the installation instructions available at: +https://github.com/OCA/geospatial/tree/12.0/base_geoengine

+
+
+

Configuration

+

To setup a product for quoting and selling field service orders:

+
    +
  • Go to Sales > Catalog > Products
  • +
  • Create or select a product
  • +
  • Set the Product Type to ‘Service’ under General Information tab
  • +
  • Under Invoicing tab, set the Field Service Tracking option
  • +
  • Select the FSM Order Template that will be used for creating FSM Orders when +a Sale Order is confirmed with this product
  • +
+

To setup a sales territory:

+
    +
  • Go to Field Service > Master Data > Locations
  • +
  • Create or select a location
  • +
  • Go to the Sales tab and select the sales territory
  • +
+
+
+

Usage

+
    +
  • Go to Sales
  • +
  • Create a new Quotation/Sale Order
  • +
  • Set the FSM Location to be used
  • +
  • On a Sale Order Line, select a product configured for field service orders
  • +
  • Confirm the Sale Order
  • +
  • Field Service orders linked to SO lines are created
  • +
  • +
    When a Field Service order is completed, the quantity delivered for its
    +
    linked sale order line will be updated to the quantity ordered, indicating +this line is ready for invoicing.
    +
    +
  • +
+
+
+

Known issues / Roadmap

+

The roadmap of the Field Service application is documented on +Github.

+
+
+

Bug Tracker

+

Bugs are tracked on GitHub 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.

+

Do not contact contributors directly about support or help with technical issues.

+
+
+

Credits

+
+

Authors

+
    +
  • Open Source Integrators
  • +
+
+
+

Contributors

+ +
+
+

Maintainers

+

This module is maintained by the OCA.

+Odoo Community Association +

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.

+

Current maintainers:

+

wolfhall max3903 brian10048

+

This module is part of the OCA/field-service project on GitHub.

+

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

+
+
+
+ + From aca6960f83a3b5b4b5f50fa79145631974027d7d Mon Sep 17 00:00:00 2001 From: brian10048 Date: Fri, 6 Dec 2019 08:32:16 -0500 Subject: [PATCH 02/35] [IMP] fieldservice_sale_stock: Auto Install module --- fieldservice_sale_stock/__manifest__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fieldservice_sale_stock/__manifest__.py b/fieldservice_sale_stock/__manifest__.py index 5286658789..22c39ca41c 100644 --- a/fieldservice_sale_stock/__manifest__.py +++ b/fieldservice_sale_stock/__manifest__.py @@ -3,7 +3,7 @@ { 'name': 'Field Service - Sale Stock', - 'version': '12.0.0.1.0', + 'version': '12.0.1.0.0', 'summary': 'Sell stockable items linked to field service orders.', 'category': 'Field Service', 'author': 'Brian McMaster, Odoo Community Association (OCA)', @@ -20,4 +20,5 @@ 'brian10048', ], 'installable': True, + 'auto_install': True, } From 7bcdb3d687f1bfdd7eb90f1032863e731b34f99a Mon Sep 17 00:00:00 2001 From: brian10048 Date: Fri, 6 Dec 2019 09:59:24 -0500 Subject: [PATCH 03/35] [FIX] fieldservice_sale Consumable and Storable product types were not generating field services --- fieldservice_sale_stock/models/sale_order.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fieldservice_sale_stock/models/sale_order.py b/fieldservice_sale_stock/models/sale_order.py index e91eefe162..69420597c9 100644 --- a/fieldservice_sale_stock/models/sale_order.py +++ b/fieldservice_sale_stock/models/sale_order.py @@ -17,9 +17,9 @@ def _link_pickings_to_fsm(self): pickings.write({'fsm_order_id': fsm_order.id}) @api.multi - def action_confirm(self): + def _action_confirm(self): """ On SO confirmation, link the fsm order on the pickings created by the sale order """ - result = super().action_confirm() + result = super()._action_confirm() self._link_pickings_to_fsm() return result From 165e325225576774253a5673c142ab928f3dd4fb Mon Sep 17 00:00:00 2001 From: Maxime Chambreuil Date: Tue, 10 Dec 2019 09:28:08 -0600 Subject: [PATCH 04/35] [FIX] fieldservice_sale_stock: Expecting one result --- fieldservice_sale_stock/README.rst | 48 ++++++------------ .../i18n/fieldservice_sale_stock.pot | 20 ++++++++ fieldservice_sale_stock/models/sale_order.py | 5 +- .../static/description/index.html | 49 ++++++------------- 4 files changed, 55 insertions(+), 67 deletions(-) create mode 100644 fieldservice_sale_stock/i18n/fieldservice_sale_stock.pot diff --git a/fieldservice_sale_stock/README.rst b/fieldservice_sale_stock/README.rst index 9bf6f8719e..ef394251e2 100644 --- a/fieldservice_sale_stock/README.rst +++ b/fieldservice_sale_stock/README.rst @@ -1,6 +1,6 @@ -===================== -Field Service - Sales -===================== +========================== +Field Service - Sale Stock +========================== .. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! This file is generated by oca-gen-addon-readme !! @@ -14,10 +14,10 @@ Field Service - Sales :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html :alt: License: AGPL-3 .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Ffield--service-lightgray.png?logo=github - :target: https://github.com/OCA/field-service/tree/12.0/fieldservice_sale + :target: https://github.com/OCA/field-service/tree/12.0/fieldservice_sale_stock :alt: OCA/field-service .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png - :target: https://translation.odoo-community.org/projects/field-service-12-0/field-service-12-0-fieldservice_sale + :target: https://translation.odoo-community.org/projects/field-service-12-0/field-service-12-0-fieldservice_sale_stock :alt: Translate me on Weblate .. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png :target: https://runbot.odoo-community.org/runbot/264/12.0 @@ -25,8 +25,8 @@ Field Service - Sales |badge1| |badge2| |badge3| |badge4| |badge5| -The module integrates the Field Service application with the Sales one and -allows you to sell field service products. +This module links pickings created by a sale order to the field +service order created by the sale order. **Table of contents** @@ -44,20 +44,13 @@ https://github.com/OCA/geospatial/tree/12.0/base_geoengine Configuration ============= -To setup a product for quoting and selling field service orders: +Configure a storable product that generates a unique field service order for +an individual sale order: * Go to Sales > Catalog > Products * Create or select a product -* Set the Product Type to 'Service' under General Information tab -* Under Invoicing tab, set the Field Service Tracking option -* Select the FSM Order Template that will be used for creating FSM Orders when - a Sale Order is confirmed with this product - -To setup a sales territory: - -* Go to Field Service > Master Data > Locations -* Create or select a location -* Go to the Sales tab and select the sales territory +* Set the type to 'Storable' +* Set the Service Policy to 'Per Sale Order' Usage ===== @@ -68,9 +61,8 @@ Usage * On a Sale Order Line, select a product configured for field service orders * Confirm the Sale Order * Field Service orders linked to SO lines are created -* When a Field Service order is completed, the quantity delivered for its - linked sale order line will be updated to the quantity ordered, indicating - this line is ready for invoicing. +* The pickings for storable products will get linked to the newly created + field service order Known issues / Roadmap ====================== @@ -84,7 +76,7 @@ Bug Tracker Bugs are tracked on `GitHub 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 `_. +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -94,20 +86,12 @@ Credits Authors ~~~~~~~ -* Open Source Integrators +* Brian McMaster Contributors ~~~~~~~~~~~~ -* Open Source Integrators - - * Steve Campbell - * Maxime Chambreuil - * Wolfgang Hall - -* Serpent Consulting Services Pvt. Ltd. * Brian McMaster -* Raphaël Reverdy Maintainers ~~~~~~~~~~~ @@ -136,6 +120,6 @@ Current `maintainers `__: |maintainer-wolfhall| |maintainer-max3903| |maintainer-brian10048| -This module is part of the `OCA/field-service `_ project on GitHub. +This module is part of the `OCA/field-service `_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/fieldservice_sale_stock/i18n/fieldservice_sale_stock.pot b/fieldservice_sale_stock/i18n/fieldservice_sale_stock.pot new file mode 100644 index 0000000000..92e47bb20e --- /dev/null +++ b/fieldservice_sale_stock/i18n/fieldservice_sale_stock.pot @@ -0,0 +1,20 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * fieldservice_sale_stock +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 12.0\n" +"Report-Msgid-Bugs-To: \n" +"Last-Translator: <>\n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: fieldservice_sale_stock +#: model:ir.model,name:fieldservice_sale_stock.model_sale_order +msgid "Sale Order" +msgstr "" + diff --git a/fieldservice_sale_stock/models/sale_order.py b/fieldservice_sale_stock/models/sale_order.py index 69420597c9..a5ba38ee72 100644 --- a/fieldservice_sale_stock/models/sale_order.py +++ b/fieldservice_sale_stock/models/sale_order.py @@ -10,8 +10,11 @@ class SaleOrder(models.Model): @api.multi def _link_pickings_to_fsm(self): for order in self: + # TODO: We may want to split the picking to have one picking + # per FSM order fsm_order = self.env['fsm.order'].search([ - ('sale_id', '=', order.id) + ('sale_id', '=', order.id), + ('sale_line_id', '=', False), ]) pickings = order.picking_ids pickings.write({'fsm_order_id': fsm_order.id}) diff --git a/fieldservice_sale_stock/static/description/index.html b/fieldservice_sale_stock/static/description/index.html index ae8d6fe6d4..92a5f96904 100644 --- a/fieldservice_sale_stock/static/description/index.html +++ b/fieldservice_sale_stock/static/description/index.html @@ -4,7 +4,7 @@ -Field Service - Sales +Field Service - Sale Stock -
-

Field Service - Sales

+
+

Field Service - Sale Stock

-

Beta License: AGPL-3 OCA/field-service Translate me on Weblate Try me on Runbot

-

The module integrates the Field Service application with the Sales one and -allows you to sell field service products.

+

Beta License: AGPL-3 OCA/field-service Translate me on Weblate Try me on Runbot

+

This module links pickings created by a sale order to the field +service order created by the sale order.

Table of contents

Configuration

-

To setup a product for quoting and selling field service orders:

+

Configure a storable product that generates a unique field service order for +an individual sale order:

  • Go to Sales > Catalog > Products
  • Create or select a product
  • -
  • Set the Product Type to ‘Service’ under General Information tab
  • -
  • Under Invoicing tab, set the Field Service Tracking option
  • -
  • Select the FSM Order Template that will be used for creating FSM Orders when -a Sale Order is confirmed with this product
  • -
-

To setup a sales territory:

-
    -
  • Go to Field Service > Master Data > Locations
  • -
  • Create or select a location
  • -
  • Go to the Sales tab and select the sales territory
  • +
  • Set the type to ‘Storable’
  • +
  • Set the Service Policy to ‘Per Sale Order’
@@ -419,12 +412,8 @@

Usage

  • On a Sale Order Line, select a product configured for field service orders
  • Confirm the Sale Order
  • Field Service orders linked to SO lines are created
  • -
  • -
    When a Field Service order is completed, the quantity delivered for its
    -
    linked sale order line will be updated to the quantity ordered, indicating -this line is ready for invoicing.
    -
    -
  • +
  • The pickings for storable products will get linked to the newly created +field service order
  • @@ -437,7 +426,7 @@

    Bug Tracker

    Bugs are tracked on GitHub 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.

    +feedback.

    Do not contact contributors directly about support or help with technical issues.

    @@ -445,21 +434,13 @@

    Credits

    Authors

      -
    • Open Source Integrators
    • +
    • Brian McMaster

    Contributors

    @@ -471,7 +452,7 @@

    Maintainers

    promote its widespread use.

    Current maintainers:

    wolfhall max3903 brian10048

    -

    This module is part of the OCA/field-service project on GitHub.

    +

    This module is part of the OCA/field-service project on GitHub.

    You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

    From 0432902dc50d0f027569fa9d00f0d4b71f669264 Mon Sep 17 00:00:00 2001 From: Maxime Chambreuil Date: Sun, 22 Dec 2019 10:55:20 -0600 Subject: [PATCH 05/35] [IMP] fieldservice_sale_stock --- fieldservice_sale_stock/models/sale_order.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fieldservice_sale_stock/models/sale_order.py b/fieldservice_sale_stock/models/sale_order.py index a5ba38ee72..eafbc6ea1a 100644 --- a/fieldservice_sale_stock/models/sale_order.py +++ b/fieldservice_sale_stock/models/sale_order.py @@ -17,7 +17,10 @@ def _link_pickings_to_fsm(self): ('sale_line_id', '=', False), ]) pickings = order.picking_ids - pickings.write({'fsm_order_id': fsm_order.id}) + for picking in pickings: + picking.fsm_order_id = fsm_order.id + for move in picking.move_lines: + move.fsm_order_id = move.sale_line_id.fsm_order_id.id @api.multi def _action_confirm(self): From 4c156526a8c4415821ecb4903e7b7568f4e9f0a9 Mon Sep 17 00:00:00 2001 From: OCA-git-bot Date: Mon, 30 Dec 2019 15:48:53 +0000 Subject: [PATCH 06/35] fieldservice_sale_stock 12.0.1.0.1 --- fieldservice_sale_stock/__manifest__.py | 2 +- fieldservice_sale_stock/i18n/es_CL.po | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 fieldservice_sale_stock/i18n/es_CL.po diff --git a/fieldservice_sale_stock/__manifest__.py b/fieldservice_sale_stock/__manifest__.py index 22c39ca41c..f171d3d74d 100644 --- a/fieldservice_sale_stock/__manifest__.py +++ b/fieldservice_sale_stock/__manifest__.py @@ -3,7 +3,7 @@ { 'name': 'Field Service - Sale Stock', - 'version': '12.0.1.0.0', + 'version': '12.0.1.0.1', 'summary': 'Sell stockable items linked to field service orders.', 'category': 'Field Service', 'author': 'Brian McMaster, Odoo Community Association (OCA)', diff --git a/fieldservice_sale_stock/i18n/es_CL.po b/fieldservice_sale_stock/i18n/es_CL.po new file mode 100644 index 0000000000..2dbbf3dec4 --- /dev/null +++ b/fieldservice_sale_stock/i18n/es_CL.po @@ -0,0 +1,20 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * fieldservice_sale_stock +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 12.0\n" +"Report-Msgid-Bugs-To: \n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: es_CL\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" + +#. module: fieldservice_sale_stock +#: model:ir.model,name:fieldservice_sale_stock.model_sale_order +msgid "Sale Order" +msgstr "" From eb55c207a36351192c3fe219ff918568f05af02c Mon Sep 17 00:00:00 2001 From: Maxime Chambreuil Date: Thu, 9 Jan 2020 08:07:57 -0800 Subject: [PATCH 07/35] [IMP] fieldservice_sale_stock --- fieldservice_sale_stock/models/sale_order.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/fieldservice_sale_stock/models/sale_order.py b/fieldservice_sale_stock/models/sale_order.py index eafbc6ea1a..e664683d03 100644 --- a/fieldservice_sale_stock/models/sale_order.py +++ b/fieldservice_sale_stock/models/sale_order.py @@ -1,6 +1,5 @@ # Copyright (C) 2019 Brian McMaster # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). - from odoo import api, models @@ -26,6 +25,6 @@ def _link_pickings_to_fsm(self): def _action_confirm(self): """ On SO confirmation, link the fsm order on the pickings created by the sale order """ - result = super()._action_confirm() + res = super()._action_confirm() self._link_pickings_to_fsm() - return result + return res From 5d05934887eee27985071902fa7f43a4da4d3fec Mon Sep 17 00:00:00 2001 From: OCA-git-bot Date: Tue, 14 Jan 2020 16:24:05 +0000 Subject: [PATCH 08/35] fieldservice_sale_stock 12.0.1.0.2 --- fieldservice_sale_stock/__manifest__.py | 2 +- fieldservice_sale_stock/i18n/pt_BR.po | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 fieldservice_sale_stock/i18n/pt_BR.po diff --git a/fieldservice_sale_stock/__manifest__.py b/fieldservice_sale_stock/__manifest__.py index f171d3d74d..b6a9ba9f69 100644 --- a/fieldservice_sale_stock/__manifest__.py +++ b/fieldservice_sale_stock/__manifest__.py @@ -3,7 +3,7 @@ { 'name': 'Field Service - Sale Stock', - 'version': '12.0.1.0.1', + 'version': '12.0.1.0.2', 'summary': 'Sell stockable items linked to field service orders.', 'category': 'Field Service', 'author': 'Brian McMaster, Odoo Community Association (OCA)', diff --git a/fieldservice_sale_stock/i18n/pt_BR.po b/fieldservice_sale_stock/i18n/pt_BR.po new file mode 100644 index 0000000000..d6d2f519f4 --- /dev/null +++ b/fieldservice_sale_stock/i18n/pt_BR.po @@ -0,0 +1,20 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * fieldservice_sale_stock +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 12.0\n" +"Report-Msgid-Bugs-To: \n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: pt_BR\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n > 1;\n" + +#. module: fieldservice_sale_stock +#: model:ir.model,name:fieldservice_sale_stock.model_sale_order +msgid "Sale Order" +msgstr "" From 6eeda332cd6c36eb551e16d8fbf90703ed78b5de Mon Sep 17 00:00:00 2001 From: Maxime Chambreuil Date: Thu, 16 Jan 2020 11:39:15 -0600 Subject: [PATCH 09/35] [ADD] Spanish (es) translation --- fieldservice_sale_stock/i18n/es.po | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 fieldservice_sale_stock/i18n/es.po diff --git a/fieldservice_sale_stock/i18n/es.po b/fieldservice_sale_stock/i18n/es.po new file mode 100644 index 0000000000..bdb017307a --- /dev/null +++ b/fieldservice_sale_stock/i18n/es.po @@ -0,0 +1,20 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * fieldservice_sale_stock +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 12.0\n" +"Report-Msgid-Bugs-To: \n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: es\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" + +#. module: fieldservice_sale_stock +#: model:ir.model,name:fieldservice_sale_stock.model_sale_order +msgid "Sale Order" +msgstr "" From 9c9d9609e6c0914c31d2713152d5512d139fe601 Mon Sep 17 00:00:00 2001 From: Maxime Chambreuil Date: Mon, 3 Feb 2020 11:15:06 -0600 Subject: [PATCH 10/35] [IMP] fieldservice_sale_stock --- fieldservice_sale_stock/i18n/pt_BR.po | 6 ++++-- fieldservice_sale_stock/models/sale_order.py | 22 +++++++++++++++----- 2 files changed, 21 insertions(+), 7 deletions(-) diff --git a/fieldservice_sale_stock/i18n/pt_BR.po b/fieldservice_sale_stock/i18n/pt_BR.po index d6d2f519f4..d4f8cb16eb 100644 --- a/fieldservice_sale_stock/i18n/pt_BR.po +++ b/fieldservice_sale_stock/i18n/pt_BR.po @@ -6,15 +6,17 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server 12.0\n" "Report-Msgid-Bugs-To: \n" -"Last-Translator: Automatically generated\n" +"PO-Revision-Date: 2020-02-05 11:13+0000\n" +"Last-Translator: Marcel Savegnago \n" "Language-Team: none\n" "Language: pt_BR\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" "Plural-Forms: nplurals=2; plural=n > 1;\n" +"X-Generator: Weblate 3.10\n" #. module: fieldservice_sale_stock #: model:ir.model,name:fieldservice_sale_stock.model_sale_order msgid "Sale Order" -msgstr "" +msgstr "Ordem de Venda" diff --git a/fieldservice_sale_stock/models/sale_order.py b/fieldservice_sale_stock/models/sale_order.py index e664683d03..4becb92aab 100644 --- a/fieldservice_sale_stock/models/sale_order.py +++ b/fieldservice_sale_stock/models/sale_order.py @@ -6,20 +6,32 @@ class SaleOrder(models.Model): _inherit = 'sale.order' + def prepare_fsm_values_for_stock_move(self, fsm_order): + return { + 'fsm_order_id': fsm_order.id, + } + + def prepare_fsm_values_for_stock_picking(self, fsm_order): + return { + 'fsm_order_id': fsm_order.id, + } + @api.multi def _link_pickings_to_fsm(self): - for order in self: + for rec in self: # TODO: We may want to split the picking to have one picking # per FSM order fsm_order = self.env['fsm.order'].search([ - ('sale_id', '=', order.id), + ('sale_id', '=', rec.id), ('sale_line_id', '=', False), ]) - pickings = order.picking_ids + pickings = rec.picking_ids for picking in pickings: - picking.fsm_order_id = fsm_order.id + picking.write( + rec.prepare_fsm_values_for_stock_picking(fsm_order)) for move in picking.move_lines: - move.fsm_order_id = move.sale_line_id.fsm_order_id.id + move.write( + rec.prepare_fsm_values_for_stock_move(fsm_order)) @api.multi def _action_confirm(self): From 23950543689cabcaa6da9e3b80e00c5c20a9d7f8 Mon Sep 17 00:00:00 2001 From: OCA-git-bot Date: Sun, 9 Feb 2020 21:36:05 +0000 Subject: [PATCH 11/35] fieldservice_sale_stock 12.0.1.0.3 --- fieldservice_sale_stock/__manifest__.py | 2 +- fieldservice_sale_stock/i18n/es.po | 6 ++++-- fieldservice_sale_stock/i18n/pt_BR.po | 4 ++-- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/fieldservice_sale_stock/__manifest__.py b/fieldservice_sale_stock/__manifest__.py index b6a9ba9f69..9ac646b4c5 100644 --- a/fieldservice_sale_stock/__manifest__.py +++ b/fieldservice_sale_stock/__manifest__.py @@ -3,7 +3,7 @@ { 'name': 'Field Service - Sale Stock', - 'version': '12.0.1.0.2', + 'version': '12.0.1.0.3', 'summary': 'Sell stockable items linked to field service orders.', 'category': 'Field Service', 'author': 'Brian McMaster, Odoo Community Association (OCA)', diff --git a/fieldservice_sale_stock/i18n/es.po b/fieldservice_sale_stock/i18n/es.po index bdb017307a..9d18630450 100644 --- a/fieldservice_sale_stock/i18n/es.po +++ b/fieldservice_sale_stock/i18n/es.po @@ -6,15 +6,17 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server 12.0\n" "Report-Msgid-Bugs-To: \n" -"Last-Translator: Automatically generated\n" +"PO-Revision-Date: 2020-03-25 17:13+0000\n" +"Last-Translator: Nelson Ramírez Sánchez \n" "Language-Team: none\n" "Language: es\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" "Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 3.10\n" #. module: fieldservice_sale_stock #: model:ir.model,name:fieldservice_sale_stock.model_sale_order msgid "Sale Order" -msgstr "" +msgstr "Pedidos de Venta" diff --git a/fieldservice_sale_stock/i18n/pt_BR.po b/fieldservice_sale_stock/i18n/pt_BR.po index d4f8cb16eb..05e1e13821 100644 --- a/fieldservice_sale_stock/i18n/pt_BR.po +++ b/fieldservice_sale_stock/i18n/pt_BR.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server 12.0\n" "Report-Msgid-Bugs-To: \n" -"PO-Revision-Date: 2020-02-05 11:13+0000\n" +"PO-Revision-Date: 2020-02-25 09:13+0000\n" "Last-Translator: Marcel Savegnago \n" "Language-Team: none\n" "Language: pt_BR\n" @@ -19,4 +19,4 @@ msgstr "" #. module: fieldservice_sale_stock #: model:ir.model,name:fieldservice_sale_stock.model_sale_order msgid "Sale Order" -msgstr "Ordem de Venda" +msgstr "Pedido de Venda" From 4dd5dbb285435f897f48f7747bb6dc493cfa5cde Mon Sep 17 00:00:00 2001 From: Maxime Chambreuil Date: Mon, 11 May 2020 23:05:47 -0500 Subject: [PATCH 12/35] [FIX] fieldservice_sale_stock: Set the FSM order on the procurement group --- fieldservice_sale_stock/models/sale_order.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fieldservice_sale_stock/models/sale_order.py b/fieldservice_sale_stock/models/sale_order.py index 4becb92aab..0ad2dd21c9 100644 --- a/fieldservice_sale_stock/models/sale_order.py +++ b/fieldservice_sale_stock/models/sale_order.py @@ -25,8 +25,8 @@ def _link_pickings_to_fsm(self): ('sale_id', '=', rec.id), ('sale_line_id', '=', False), ]) - pickings = rec.picking_ids - for picking in pickings: + rec.procurement_group_id.fsm_order_id = fsm_order.id or False + for picking in rec.picking_ids: picking.write( rec.prepare_fsm_values_for_stock_picking(fsm_order)) for move in picking.move_lines: From cc4a252d54edb293a5ba63c3c1e8d01a46c664aa Mon Sep 17 00:00:00 2001 From: Maxime Chambreuil Date: Tue, 19 May 2020 21:09:17 -0500 Subject: [PATCH 13/35] [FIX] fieldservice_sale_stock --- fieldservice_sale_stock/models/sale_order.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fieldservice_sale_stock/models/sale_order.py b/fieldservice_sale_stock/models/sale_order.py index 0ad2dd21c9..4353f7c6c5 100644 --- a/fieldservice_sale_stock/models/sale_order.py +++ b/fieldservice_sale_stock/models/sale_order.py @@ -25,7 +25,8 @@ def _link_pickings_to_fsm(self): ('sale_id', '=', rec.id), ('sale_line_id', '=', False), ]) - rec.procurement_group_id.fsm_order_id = fsm_order.id or False + if rec.procurement_group_id: + rec.procurement_group_id.fsm_order_id = fsm_order.id or False for picking in rec.picking_ids: picking.write( rec.prepare_fsm_values_for_stock_picking(fsm_order)) From d42593c635a37ebb1fef7509720e16138d5ba0a5 Mon Sep 17 00:00:00 2001 From: OCA-git-bot Date: Wed, 20 May 2020 15:11:59 +0000 Subject: [PATCH 14/35] fieldservice_sale_stock 12.0.1.0.4 --- fieldservice_sale_stock/__manifest__.py | 2 +- fieldservice_sale_stock/i18n/es.po | 4 ++-- fieldservice_sale_stock/i18n/es_CL.po | 6 ++++-- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/fieldservice_sale_stock/__manifest__.py b/fieldservice_sale_stock/__manifest__.py index 9ac646b4c5..bdf32b4bcd 100644 --- a/fieldservice_sale_stock/__manifest__.py +++ b/fieldservice_sale_stock/__manifest__.py @@ -3,7 +3,7 @@ { 'name': 'Field Service - Sale Stock', - 'version': '12.0.1.0.3', + 'version': '12.0.1.0.4', 'summary': 'Sell stockable items linked to field service orders.', 'category': 'Field Service', 'author': 'Brian McMaster, Odoo Community Association (OCA)', diff --git a/fieldservice_sale_stock/i18n/es.po b/fieldservice_sale_stock/i18n/es.po index 9d18630450..d770f84b27 100644 --- a/fieldservice_sale_stock/i18n/es.po +++ b/fieldservice_sale_stock/i18n/es.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server 12.0\n" "Report-Msgid-Bugs-To: \n" -"PO-Revision-Date: 2020-03-25 17:13+0000\n" +"PO-Revision-Date: 2020-06-07 05:19+0000\n" "Last-Translator: Nelson Ramírez Sánchez \n" "Language-Team: none\n" "Language: es\n" @@ -19,4 +19,4 @@ msgstr "" #. module: fieldservice_sale_stock #: model:ir.model,name:fieldservice_sale_stock.model_sale_order msgid "Sale Order" -msgstr "Pedidos de Venta" +msgstr "Pedido de Venta" diff --git a/fieldservice_sale_stock/i18n/es_CL.po b/fieldservice_sale_stock/i18n/es_CL.po index 2dbbf3dec4..a7d49c435b 100644 --- a/fieldservice_sale_stock/i18n/es_CL.po +++ b/fieldservice_sale_stock/i18n/es_CL.po @@ -6,15 +6,17 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server 12.0\n" "Report-Msgid-Bugs-To: \n" -"Last-Translator: Automatically generated\n" +"PO-Revision-Date: 2020-06-07 05:19+0000\n" +"Last-Translator: Nelson Ramírez Sánchez \n" "Language-Team: none\n" "Language: es_CL\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" "Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 3.10\n" #. module: fieldservice_sale_stock #: model:ir.model,name:fieldservice_sale_stock.model_sale_order msgid "Sale Order" -msgstr "" +msgstr "Nota de Venta" From 6c6634f6f50c3f5044b5645c58dff0de9810370e Mon Sep 17 00:00:00 2001 From: Freni-OSI Date: Mon, 19 Apr 2021 10:51:06 +0530 Subject: [PATCH 15/35] [FIX] Travis --- fieldservice_sale_stock/__manifest__.py | 34 ++++++++++---------- fieldservice_sale_stock/models/__init__.py | 4 +-- fieldservice_sale_stock/models/sale_order.py | 26 +++++++-------- 3 files changed, 31 insertions(+), 33 deletions(-) diff --git a/fieldservice_sale_stock/__manifest__.py b/fieldservice_sale_stock/__manifest__.py index bdf32b4bcd..ffb310a536 100644 --- a/fieldservice_sale_stock/__manifest__.py +++ b/fieldservice_sale_stock/__manifest__.py @@ -2,23 +2,23 @@ # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). { - 'name': 'Field Service - Sale Stock', - 'version': '12.0.1.0.4', - 'summary': 'Sell stockable items linked to field service orders.', - 'category': 'Field Service', - 'author': 'Brian McMaster, Odoo Community Association (OCA)', - 'website': 'https://github.com/OCA/field-service', - 'depends': [ - 'fieldservice_sale', - 'fieldservice_stock', + "name": "Field Service - Sale Stock", + "version": "14.0.1.0.0", + "summary": "Sell stockable items linked to field service orders.", + "category": "Field Service", + "author": "Brian McMaster, Odoo Community Association (OCA)", + "website": "https://github.com/OCA/field-service", + "depends": [ + "fieldservice_sale", + "fieldservice_stock", ], - 'license': 'AGPL-3', - 'development_status': 'Beta', - 'maintainers': [ - 'wolfhall', - 'max3903', - 'brian10048', + "license": "AGPL-3", + "development_status": "Beta", + "maintainers": [ + "wolfhall", + "max3903", + "brian10048", ], - 'installable': True, - 'auto_install': True, + "installable": True, + "auto_install": True, } diff --git a/fieldservice_sale_stock/models/__init__.py b/fieldservice_sale_stock/models/__init__.py index e02b396f5b..db960b74e1 100644 --- a/fieldservice_sale_stock/models/__init__.py +++ b/fieldservice_sale_stock/models/__init__.py @@ -1,6 +1,4 @@ # Copyright (C) 2019 Brian McMaster # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -from . import ( - sale_order -) +from . import sale_order diff --git a/fieldservice_sale_stock/models/sale_order.py b/fieldservice_sale_stock/models/sale_order.py index 4353f7c6c5..8a16403e4b 100644 --- a/fieldservice_sale_stock/models/sale_order.py +++ b/fieldservice_sale_stock/models/sale_order.py @@ -4,16 +4,16 @@ class SaleOrder(models.Model): - _inherit = 'sale.order' + _inherit = "sale.order" def prepare_fsm_values_for_stock_move(self, fsm_order): return { - 'fsm_order_id': fsm_order.id, + "fsm_order_id": fsm_order.id, } def prepare_fsm_values_for_stock_picking(self, fsm_order): return { - 'fsm_order_id': fsm_order.id, + "fsm_order_id": fsm_order.id, } @api.multi @@ -21,23 +21,23 @@ def _link_pickings_to_fsm(self): for rec in self: # TODO: We may want to split the picking to have one picking # per FSM order - fsm_order = self.env['fsm.order'].search([ - ('sale_id', '=', rec.id), - ('sale_line_id', '=', False), - ]) + fsm_order = self.env["fsm.order"].search( + [ + ("sale_id", "=", rec.id), + ("sale_line_id", "=", False), + ] + ) if rec.procurement_group_id: rec.procurement_group_id.fsm_order_id = fsm_order.id or False for picking in rec.picking_ids: - picking.write( - rec.prepare_fsm_values_for_stock_picking(fsm_order)) + picking.write(rec.prepare_fsm_values_for_stock_picking(fsm_order)) for move in picking.move_lines: - move.write( - rec.prepare_fsm_values_for_stock_move(fsm_order)) + move.write(rec.prepare_fsm_values_for_stock_move(fsm_order)) @api.multi def _action_confirm(self): - """ On SO confirmation, link the fsm order on the pickings - created by the sale order """ + """On SO confirmation, link the fsm order on the pickings + created by the sale order""" res = super()._action_confirm() self._link_pickings_to_fsm() return res From 202e610ab685802dcf75ea10f6f56b4b6bc0316d Mon Sep 17 00:00:00 2001 From: Freni-OSI Date: Mon, 19 Apr 2021 11:06:47 +0530 Subject: [PATCH 16/35] [14.0][MIG] fieldservice_sale_stock --- fieldservice_sale_stock/README.rst | 12 +- fieldservice_sale_stock/models/sale_order.py | 4 +- .../readme/CONTRIBUTORS.rst | 2 + .../static/description/index.html | 8 +- fieldservice_sale_stock/tests/__init__.py | 5 + .../tests/test_fsm_sale_order.py | 458 ++++++++++++++++++ 6 files changed, 478 insertions(+), 11 deletions(-) create mode 100644 fieldservice_sale_stock/tests/__init__.py create mode 100644 fieldservice_sale_stock/tests/test_fsm_sale_order.py diff --git a/fieldservice_sale_stock/README.rst b/fieldservice_sale_stock/README.rst index ef394251e2..5b271750fa 100644 --- a/fieldservice_sale_stock/README.rst +++ b/fieldservice_sale_stock/README.rst @@ -14,13 +14,13 @@ Field Service - Sale Stock :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html :alt: License: AGPL-3 .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Ffield--service-lightgray.png?logo=github - :target: https://github.com/OCA/field-service/tree/12.0/fieldservice_sale_stock + :target: https://github.com/OCA/field-service/tree/14.0/fieldservice_sale_stock :alt: OCA/field-service .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png - :target: https://translation.odoo-community.org/projects/field-service-12-0/field-service-12-0-fieldservice_sale_stock + :target: https://translation.odoo-community.org/projects/field-service-14-0/field-service-14-0-fieldservice_sale_stock :alt: Translate me on Weblate .. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png - :target: https://runbot.odoo-community.org/runbot/264/12.0 + :target: https://runbot.odoo-community.org/runbot/264/14.0 :alt: Try me on Runbot |badge1| |badge2| |badge3| |badge4| |badge5| @@ -76,7 +76,7 @@ Bug Tracker Bugs are tracked on `GitHub 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 `_. +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -92,6 +92,8 @@ Contributors ~~~~~~~~~~~~ * Brian McMaster +* Ammar Officewala +* Freni Patel Maintainers ~~~~~~~~~~~ @@ -120,6 +122,6 @@ Current `maintainers `__: |maintainer-wolfhall| |maintainer-max3903| |maintainer-brian10048| -This module is part of the `OCA/field-service `_ project on GitHub. +This module is part of the `OCA/field-service `_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/fieldservice_sale_stock/models/sale_order.py b/fieldservice_sale_stock/models/sale_order.py index 8a16403e4b..7305e15f75 100644 --- a/fieldservice_sale_stock/models/sale_order.py +++ b/fieldservice_sale_stock/models/sale_order.py @@ -1,6 +1,6 @@ # Copyright (C) 2019 Brian McMaster # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -from odoo import api, models +from odoo import models class SaleOrder(models.Model): @@ -16,7 +16,6 @@ def prepare_fsm_values_for_stock_picking(self, fsm_order): "fsm_order_id": fsm_order.id, } - @api.multi def _link_pickings_to_fsm(self): for rec in self: # TODO: We may want to split the picking to have one picking @@ -34,7 +33,6 @@ def _link_pickings_to_fsm(self): for move in picking.move_lines: move.write(rec.prepare_fsm_values_for_stock_move(fsm_order)) - @api.multi def _action_confirm(self): """On SO confirmation, link the fsm order on the pickings created by the sale order""" diff --git a/fieldservice_sale_stock/readme/CONTRIBUTORS.rst b/fieldservice_sale_stock/readme/CONTRIBUTORS.rst index 39ef3fa3d7..4af187d4e1 100644 --- a/fieldservice_sale_stock/readme/CONTRIBUTORS.rst +++ b/fieldservice_sale_stock/readme/CONTRIBUTORS.rst @@ -1 +1,3 @@ * Brian McMaster +* Ammar Officewala +* Freni Patel diff --git a/fieldservice_sale_stock/static/description/index.html b/fieldservice_sale_stock/static/description/index.html index 92a5f96904..f4f33e39a9 100644 --- a/fieldservice_sale_stock/static/description/index.html +++ b/fieldservice_sale_stock/static/description/index.html @@ -367,7 +367,7 @@

    Field Service - Sale Stock

    !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> -

    Beta License: AGPL-3 OCA/field-service Translate me on Weblate Try me on Runbot

    +

    Beta License: AGPL-3 OCA/field-service Translate me on Weblate Try me on Runbot

    This module links pickings created by a sale order to the field service order created by the sale order.

    Table of contents

    @@ -426,7 +426,7 @@

    Bug Tracker

    Bugs are tracked on GitHub 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.

    +feedback.

    Do not contact contributors directly about support or help with technical issues.

    @@ -441,6 +441,8 @@

    Authors

    Contributors

    @@ -452,7 +454,7 @@

    Maintainers

    promote its widespread use.

    Current maintainers:

    wolfhall max3903 brian10048

    -

    This module is part of the OCA/field-service project on GitHub.

    +

    This module is part of the OCA/field-service project on GitHub.

    You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

    diff --git a/fieldservice_sale_stock/tests/__init__.py b/fieldservice_sale_stock/tests/__init__.py new file mode 100644 index 0000000000..06b87f7321 --- /dev/null +++ b/fieldservice_sale_stock/tests/__init__.py @@ -0,0 +1,5 @@ +# Copyright (C) 2019 Clément Mombereau (Akretion) +# Copyright (C) 2019 Brian McMaster +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html) + +from . import test_fsm_sale_order diff --git a/fieldservice_sale_stock/tests/test_fsm_sale_order.py b/fieldservice_sale_stock/tests/test_fsm_sale_order.py new file mode 100644 index 0000000000..7898f60539 --- /dev/null +++ b/fieldservice_sale_stock/tests/test_fsm_sale_order.py @@ -0,0 +1,458 @@ +# Copyright (C) 2019 Brian McMaster +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from odoo import fields + +from odoo.addons.fieldservice_sale.tests.test_fsm_sale_common import TestFSMSale + + +class TestFSMSaleOrder(TestFSMSale): + @classmethod + def setUpClass(cls): + super(TestFSMSaleOrder, cls).setUpClass() + cls.test_location = cls.env.ref("fieldservice.test_location") + + # Setup products that when sold will create some FSM orders + cls.setUpFSMProducts() + cls.partner_customer_usd = cls.env["res.partner"].create( + { + "name": "partner_a", + "company_id": False, + } + ) + cls.pricelist_usd = cls.env["product.pricelist"].search( + [("currency_id.name", "=", "USD")], limit=1 + ) + cls.fsm_per_order_1 = cls.env["product.product"].create( + { + "name": "FSM Order per Sale Order #1", + "categ_id": cls.env.ref("product.product_category_3").id, + "standard_price": 85.0, + "list_price": 90.0, + "type": "product", + "uom_id": cls.env.ref("uom.product_uom_unit").id, + "uom_po_id": cls.env.ref("uom.product_uom_unit").id, + "invoice_policy": "order", + "field_service_tracking": "sale", + "fsm_order_template_id": cls.fsm_template_1.id, + } + ) + # Create some sale orders that will use the above products + SaleOrder = cls.env["sale.order"].with_context(tracking_disable=True) + # create a generic Sale Order with one product + # set to create FSM service per sale order + cls.sale_order_1 = SaleOrder.create( + { + "partner_id": cls.partner_customer_usd.id, + "fsm_location_id": cls.test_location.id, + "pricelist_id": cls.pricelist_usd.id, + } + ) + cls.sol_service_per_order_1 = cls.env["sale.order.line"].create( + { + "name": cls.fsm_per_order_1.name, + "product_id": cls.fsm_per_order_1.id, + "product_uom_qty": 1, + "product_uom": cls.fsm_per_order_1.uom_id.id, + "price_unit": cls.fsm_per_order_1.list_price, + "order_id": cls.sale_order_1.id, + "tax_id": False, + } + ) + # create a generic Sale Order with one product + # set to create FSM service per sale order line + cls.sale_order_2 = SaleOrder.create( + { + "partner_id": cls.partner_customer_usd.id, + "fsm_location_id": cls.test_location.id, + "pricelist_id": cls.pricelist_usd.id, + } + ) + cls.sol_service_per_line_1 = cls.env["sale.order.line"].create( + { + "name": cls.fsm_per_line_1.name, + "product_id": cls.fsm_per_line_1.id, + "product_uom_qty": 1, + "product_uom": cls.fsm_per_line_1.uom_id.id, + "price_unit": cls.fsm_per_line_1.list_price, + "order_id": cls.sale_order_2.id, + "tax_id": False, + } + ) + # create a generic Sale Order with multiple products + # set to create FSM service per sale order line + cls.sale_order_3 = SaleOrder.create( + { + "partner_id": cls.partner_customer_usd.id, + "fsm_location_id": cls.test_location.id, + "pricelist_id": cls.pricelist_usd.id, + } + ) + cls.sol_service_per_line_2 = cls.env["sale.order.line"].create( + { + "name": cls.fsm_per_line_1.name, + "product_id": cls.fsm_per_line_1.id, + "product_uom_qty": 1, + "product_uom": cls.fsm_per_line_1.uom_id.id, + "price_unit": cls.fsm_per_line_1.list_price, + "order_id": cls.sale_order_3.id, + "tax_id": False, + } + ) + cls.sol_service_per_line_3 = cls.env["sale.order.line"].create( + { + "name": cls.fsm_per_line_2.name, + "product_id": cls.fsm_per_line_2.id, + "product_uom_qty": 1, + "product_uom": cls.fsm_per_line_2.uom_id.id, + "price_unit": cls.fsm_per_line_2.list_price, + "order_id": cls.sale_order_3.id, + "tax_id": False, + } + ) + # create a generic Sale Order with mixed products + # 2 lines based on service per sale order line + # 2 lines based on service per sale order + cls.sale_order_4 = SaleOrder.create( + { + "partner_id": cls.partner_customer_usd.id, + "fsm_location_id": cls.test_location.id, + "pricelist_id": cls.pricelist_usd.id, + } + ) + cls.sol_service_per_line_4 = cls.env["sale.order.line"].create( + { + "name": cls.fsm_per_line_1.name, + "product_id": cls.fsm_per_line_1.id, + "product_uom_qty": 1, + "product_uom": cls.fsm_per_line_1.uom_id.id, + "price_unit": cls.fsm_per_line_1.list_price, + "order_id": cls.sale_order_4.id, + "tax_id": False, + } + ) + cls.sol_service_per_line_5 = cls.env["sale.order.line"].create( + { + "name": cls.fsm_per_line_2.name, + "product_id": cls.fsm_per_line_2.id, + "product_uom_qty": 1, + "product_uom": cls.fsm_per_line_2.uom_id.id, + "price_unit": cls.fsm_per_line_2.list_price, + "order_id": cls.sale_order_4.id, + "tax_id": False, + } + ) + cls.sol_service_per_order_2 = cls.env["sale.order.line"].create( + { + "name": cls.fsm_per_order_1.name, + "product_id": cls.fsm_per_order_1.id, + "product_uom_qty": 1, + "product_uom": cls.fsm_per_order_1.uom_id.id, + "price_unit": cls.fsm_per_order_1.list_price, + "order_id": cls.sale_order_4.id, + "tax_id": False, + } + ) + cls.sol_service_per_order_3 = cls.env["sale.order.line"].create( + { + "name": cls.fsm_per_order_2.name, + "product_id": cls.fsm_per_order_2.id, + "product_uom_qty": 1, + "product_uom": cls.fsm_per_order_2.uom_id.id, + "price_unit": cls.fsm_per_order_2.list_price, + "order_id": cls.sale_order_4.id, + "tax_id": False, + } + ) + + def _isp_account_installed(self): + """Checks if module is installed which will require more + logic for the tests. + :return Boolean indicating the installed status of the module + """ + result = False + isp_account_module = self.env["ir.module.module"].search( + [("name", "=", "fieldservice_isp_account")] + ) + if isp_account_module and isp_account_module.state == "installed": + result = True + return result + + def _fulfill_order(self, order): + """Extra logic required to fulfill FSM order status and prevent + validation error when attempting to complete the FSM order + :return FSM Order with additional fields set + """ + analytic_account = self.env.ref("analytic.analytic_administratif") + self.test_location.analytic_account_id = analytic_account.id + timesheet = self.env["account.analytic.line"].create( + { + "name": "timesheet_line", + "unit_amount": 1, + "account_id": analytic_account.id, + "user_id": self.env.ref("base.partner_admin").id, + "product_id": self.env.ref( + "fieldservice_isp_account.field_service_regular_time" + ).id, + } + ) + order.write( + { + "employee_timesheet_ids": [(6, 0, timesheet.ids)], + } + ) + return order + + def test_sale_order_1(self): + """Test the sales order 1 flow from sale to invoice. + - One FSM order linked to the Sale Order should be created. + - One Invoice linked to the FSM Order should be created. + """ + # Confirm the sale order + self.sale_order_1.action_confirm() + # 1 FSM order created + self.assertEqual( + len(self.sale_order_1.fsm_order_ids.ids), + 1, + "FSM Sale: Sale Order 1 should create 1 FSM Order", + ) + FSM_Order = self.env["fsm.order"] + fsm_order = FSM_Order.search( + [("id", "=", self.sale_order_1.fsm_order_ids[0].id)] + ) + # Sale Order linked to FSM order + self.assertEqual( + len(fsm_order.ids), 1, "FSM Sale: Sale Order not linked to FSM Order" + ) + + # Complete the FSM order + if self._isp_account_installed(): + fsm_order = self._fulfill_order(fsm_order) + fsm_order.write( + { + "date_end": fields.Datetime.today(), + "resolution": "Work completed", + } + ) + fsm_order.action_complete() + + # Invoice the order + invoice = self.sale_order_1._create_invoices() + # 1 invoices created + self.assertEqual( + len(invoice.ids), 1, "FSM Sale: Sale Order 1 should create 1 invoice" + ) + self.assertTrue( + fsm_order in invoice.fsm_order_ids, + "FSM Sale: Invoice should be linked to FSM Order", + ) + + def test_sale_order_2(self): + """Test the sales order 2 flow from sale to invoice. + - One FSM order linked to the Sale Order Line should be created. + - The FSM Order should update qty_delivered when completed. + - One Invoice linked to the FSM Order should be created. + """ + sol = self.sol_service_per_line_1 + # Confirm the sale order + self.sale_order_2.action_confirm() + # 1 order created + self.assertEqual( + len(self.sale_order_2.fsm_order_ids.ids), + 1, + "FSM Sale: Sale Order 2 should create 1 FSM Order", + ) + FSM_Order = self.env["fsm.order"] + fsm_order = FSM_Order.search([("id", "=", sol.fsm_order_id.id)]) + # SOL linked to FSM order + self.assertTrue( + sol.fsm_order_id.id == fsm_order.id, + "FSM Sale: Sale Order 2 Line not linked to FSM Order", + ) + + # Complete the FSM order + if self._isp_account_installed(): + fsm_order = self._fulfill_order(fsm_order) + fsm_order.write( + { + "date_end": fields.Datetime.today(), + "resolution": "Work completed", + } + ) + fsm_order.action_complete() + # qty delivered should be updated + self.assertTrue( + sol.qty_delivered == sol.product_uom_qty, + "FSM Sale: Sale Order Line qty delivered not equal to qty ordered", + ) + + # Invoice the order + invoice = self.sale_order_2._create_invoices() + # 1 invoice created + self.assertEqual( + len(invoice.ids), 1, "FSM Sale: Sale Order 2 should create 1 invoice" + ) + self.assertTrue( + fsm_order in invoice.fsm_order_ids, + "FSM Sale: Invoice should be linked to FSM Order", + ) + + def test_sale_order_3(self): + """Test sale order 3 flow from sale to invoice. + - An FSM order should be created for each Sale Order Line. + - The FSM Order should update qty_delivered when completed. + - An Invoice linked to each FSM Order should be created. + """ + sol1 = self.sol_service_per_line_2 + sol2 = self.sol_service_per_line_3 + + # Confirm the sale order + self.sale_order_3.action_confirm() + # 2 orders created and SOLs linked to FSM orders + self.assertEqual( + len(self.sale_order_3.fsm_order_ids.ids), + 2, + "FSM Sale: Sale Order 3 should create 2 FSM Orders", + ) + FSM_Order = self.env["fsm.order"] + fsm_order_1 = FSM_Order.search([("id", "=", sol1.fsm_order_id.id)]) + self.assertTrue( + sol1.fsm_order_id.id == fsm_order_1.id, + "FSM Sale: Sale Order Line 2 not linked to FSM Order", + ) + fsm_order_2 = FSM_Order.search([("id", "=", sol2.fsm_order_id.id)]) + self.assertTrue( + sol2.fsm_order_id.id == fsm_order_2.id, + "FSM Sale: Sale Order Line 3 not linked to FSM Order", + ) + + # Complete the FSM orders + if self._isp_account_installed(): + fsm_order_1 = self._fulfill_order(fsm_order_1) + fsm_order_1.write( + { + "date_end": fields.Datetime.today(), + "resolution": "Work completed", + } + ) + fsm_order_1.action_complete() + self.assertTrue( + sol1.qty_delivered == sol1.product_uom_qty, + "FSM Sale: Sale Order Line qty delivered not equal to qty ordered", + ) + if self._isp_account_installed(): + fsm_order_2 = self._fulfill_order(fsm_order_2) + fsm_order_2.write( + { + "date_end": fields.Datetime.today(), + "resolution": "Work completed", + } + ) + fsm_order_2.action_complete() + self.assertTrue( + sol2.qty_delivered == sol2.product_uom_qty, + "FSM Sale: Sale Order Line qty delivered not equal to qty ordered", + ) + + # Invoice the sale order + invoices = self.sale_order_3._create_invoices() + # 2 invoices created + self.assertEqual( + len(invoices.ids), 1, "FSM Sale: Sale Order 3 should create 1 invoices" + ) + inv_fsm_orders = FSM_Order + for inv in invoices: + inv_fsm_orders |= inv.fsm_order_ids + self.assertTrue( + fsm_order_1 in inv_fsm_orders, + "FSM Sale: FSM Order 1 should be linked to invoice", + ) + self.assertTrue( + fsm_order_2 in inv_fsm_orders, + "FSM Sale: FSM Order 2 should be linked to invoice", + ) + + def test_sale_order_4(self): + """Test sale order 4 flow from sale to invoice. + - Two FSM orders linked to the Sale Order Lines should be created. + - One FSM order linked to the Sale Order should be created. + - One Invoices should be created (One for each FSM Order). + """ + sol1 = self.sol_service_per_line_4 + sol2 = self.sol_service_per_line_5 + # sol3 = self.sol_service_per_order_2 + # sol4 = self.sol_service_per_order_3 + + # Confirm the sale order + self.sale_order_4.action_confirm() + # 3 orders created + self.assertEqual( + len(self.sale_order_4.fsm_order_ids.ids), + 3, + "FSM Sale: Sale Order 4 should create 3 FSM Orders", + ) + FSM_Order = self.env["fsm.order"] + fsm_order_1 = FSM_Order.search([("id", "=", sol1.fsm_order_id.id)]) + self.assertTrue( + sol1.fsm_order_id.id == fsm_order_1.id, + "FSM Sale: Sale Order Line not linked to FSM Order", + ) + fsm_order_2 = FSM_Order.search([("id", "=", sol2.fsm_order_id.id)]) + self.assertTrue( + sol2.fsm_order_id.id == fsm_order_2.id, + "FSM Sale: Sale Order Line not linked to FSM Order", + ) + fsm_order_3 = FSM_Order.search( + [ + ("id", "in", self.sale_order_4.fsm_order_ids.ids), + ("sale_line_id", "=", False), + ] + ) + self.assertEqual( + len(fsm_order_3.ids), 1, "FSM Sale: FSM Order not linked to Sale Order" + ) + + # Complete the FSM order + if self._isp_account_installed(): + fsm_order_1 = self._fulfill_order(fsm_order_1) + fsm_order_1.write( + { + "date_end": fields.Datetime.today(), + "resolution": "Work completed", + } + ) + fsm_order_1.action_complete() + self.assertTrue( + sol1.qty_delivered == sol1.product_uom_qty, + "FSM Sale: Sale Order Line qty delivered not equal to qty ordered", + ) + if self._isp_account_installed(): + fsm_order_2 = self._fulfill_order(fsm_order_2) + fsm_order_2.write( + { + "date_end": fields.Datetime.today(), + "resolution": "Work completed", + } + ) + fsm_order_2.action_complete() + self.assertTrue( + sol2.qty_delivered == sol2.product_uom_qty, + "FSM Sale: Sale Order Line qty delivered not equal to qty ordered", + ) + if self._isp_account_installed(): + fsm_order_3 = self._fulfill_order(fsm_order_3) + fsm_order_3.write( + { + "date_end": fields.Datetime.today(), + "resolution": "Work completed", + } + ) + fsm_order_3.action_complete() + # qty_delivered does not update for FSM orders linked only to the sale + + # Invoice the sale order + invoices = self.sale_order_4._create_invoices() + # 3 invoices created + self.assertEqual( + len(invoices.ids), 1, "FSM Sale: Sale Order 4 should create 1 invoice" + ) From bedaff6abded13af0e41d5e92a67999413f050b1 Mon Sep 17 00:00:00 2001 From: oca-travis Date: Tue, 3 Aug 2021 19:40:12 +0000 Subject: [PATCH 17/35] [UPD] Update fieldservice_sale_stock.pot --- .../i18n/fieldservice_sale_stock.pot | 24 +++++++++++++++---- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/fieldservice_sale_stock/i18n/fieldservice_sale_stock.pot b/fieldservice_sale_stock/i18n/fieldservice_sale_stock.pot index 92e47bb20e..6570a9956a 100644 --- a/fieldservice_sale_stock/i18n/fieldservice_sale_stock.pot +++ b/fieldservice_sale_stock/i18n/fieldservice_sale_stock.pot @@ -1,12 +1,12 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: -# * fieldservice_sale_stock +# * fieldservice_sale_stock # msgid "" msgstr "" -"Project-Id-Version: Odoo Server 12.0\n" +"Project-Id-Version: Odoo Server 14.0\n" "Report-Msgid-Bugs-To: \n" -"Last-Translator: <>\n" +"Last-Translator: \n" "Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -14,7 +14,21 @@ msgstr "" "Plural-Forms: \n" #. module: fieldservice_sale_stock -#: model:ir.model,name:fieldservice_sale_stock.model_sale_order -msgid "Sale Order" +#: model:ir.model.fields,field_description:fieldservice_sale_stock.field_sale_order__display_name +msgid "Display Name" +msgstr "" + +#. module: fieldservice_sale_stock +#: model:ir.model.fields,field_description:fieldservice_sale_stock.field_sale_order__id +msgid "ID" +msgstr "" + +#. module: fieldservice_sale_stock +#: model:ir.model.fields,field_description:fieldservice_sale_stock.field_sale_order____last_update +msgid "Last Modified on" msgstr "" +#. module: fieldservice_sale_stock +#: model:ir.model,name:fieldservice_sale_stock.model_sale_order +msgid "Sales Order" +msgstr "" From a1fe19de6039e60a15bca7ba5093f694b4acbddc Mon Sep 17 00:00:00 2001 From: mymage Date: Sun, 26 Sep 2021 18:09:16 +0000 Subject: [PATCH 18/35] Added translation using Weblate (Italian) --- fieldservice_sale_stock/i18n/it.po | 35 ++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 fieldservice_sale_stock/i18n/it.po diff --git a/fieldservice_sale_stock/i18n/it.po b/fieldservice_sale_stock/i18n/it.po new file mode 100644 index 0000000000..43b3d01d81 --- /dev/null +++ b/fieldservice_sale_stock/i18n/it.po @@ -0,0 +1,35 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * fieldservice_sale_stock +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 14.0\n" +"Report-Msgid-Bugs-To: \n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: it\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" + +#. module: fieldservice_sale_stock +#: model:ir.model.fields,field_description:fieldservice_sale_stock.field_sale_order__display_name +msgid "Display Name" +msgstr "" + +#. module: fieldservice_sale_stock +#: model:ir.model.fields,field_description:fieldservice_sale_stock.field_sale_order__id +msgid "ID" +msgstr "" + +#. module: fieldservice_sale_stock +#: model:ir.model.fields,field_description:fieldservice_sale_stock.field_sale_order____last_update +msgid "Last Modified on" +msgstr "" + +#. module: fieldservice_sale_stock +#: model:ir.model,name:fieldservice_sale_stock.model_sale_order +msgid "Sales Order" +msgstr "" From 8971a3cc7173a9eb737c59e8898b3ad583ee4f38 Mon Sep 17 00:00:00 2001 From: mymage Date: Wed, 29 Sep 2021 08:30:28 +0000 Subject: [PATCH 19/35] Translated using Weblate (Italian) Currently translated at 100.0% (4 of 4 strings) Translation: field-service-14.0/field-service-14.0-fieldservice_sale_stock Translate-URL: https://translation.odoo-community.org/projects/field-service-14-0/field-service-14-0-fieldservice_sale_stock/it/ --- fieldservice_sale_stock/i18n/it.po | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/fieldservice_sale_stock/i18n/it.po b/fieldservice_sale_stock/i18n/it.po index 43b3d01d81..05f0ff5134 100644 --- a/fieldservice_sale_stock/i18n/it.po +++ b/fieldservice_sale_stock/i18n/it.po @@ -6,30 +6,32 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server 14.0\n" "Report-Msgid-Bugs-To: \n" -"Last-Translator: Automatically generated\n" +"PO-Revision-Date: 2021-09-29 10:34+0000\n" +"Last-Translator: mymage \n" "Language-Team: none\n" "Language: it\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" "Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 4.3.2\n" #. module: fieldservice_sale_stock #: model:ir.model.fields,field_description:fieldservice_sale_stock.field_sale_order__display_name msgid "Display Name" -msgstr "" +msgstr "Nome visualizzato" #. module: fieldservice_sale_stock #: model:ir.model.fields,field_description:fieldservice_sale_stock.field_sale_order__id msgid "ID" -msgstr "" +msgstr "ID" #. module: fieldservice_sale_stock #: model:ir.model.fields,field_description:fieldservice_sale_stock.field_sale_order____last_update msgid "Last Modified on" -msgstr "" +msgstr "Ultima modifica il" #. module: fieldservice_sale_stock #: model:ir.model,name:fieldservice_sale_stock.model_sale_order msgid "Sales Order" -msgstr "" +msgstr "Ordine vendite" From 9e9d3ab93fc0bacf2066ff4bb8dbe97401fffdcd Mon Sep 17 00:00:00 2001 From: Ignacio Buioli Date: Sun, 3 Oct 2021 18:32:56 +0000 Subject: [PATCH 20/35] Added translation using Weblate (Spanish (Argentina)) --- fieldservice_sale_stock/i18n/es_AR.po | 35 +++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 fieldservice_sale_stock/i18n/es_AR.po diff --git a/fieldservice_sale_stock/i18n/es_AR.po b/fieldservice_sale_stock/i18n/es_AR.po new file mode 100644 index 0000000000..4f818dfcfb --- /dev/null +++ b/fieldservice_sale_stock/i18n/es_AR.po @@ -0,0 +1,35 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * fieldservice_sale_stock +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 14.0\n" +"Report-Msgid-Bugs-To: \n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: es_AR\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" + +#. module: fieldservice_sale_stock +#: model:ir.model.fields,field_description:fieldservice_sale_stock.field_sale_order__display_name +msgid "Display Name" +msgstr "" + +#. module: fieldservice_sale_stock +#: model:ir.model.fields,field_description:fieldservice_sale_stock.field_sale_order__id +msgid "ID" +msgstr "" + +#. module: fieldservice_sale_stock +#: model:ir.model.fields,field_description:fieldservice_sale_stock.field_sale_order____last_update +msgid "Last Modified on" +msgstr "" + +#. module: fieldservice_sale_stock +#: model:ir.model,name:fieldservice_sale_stock.model_sale_order +msgid "Sales Order" +msgstr "" From 2820e8b6fd8880bd4110a3bd0059e8d284671540 Mon Sep 17 00:00:00 2001 From: Ignacio Buioli Date: Sun, 3 Oct 2021 18:40:11 +0000 Subject: [PATCH 21/35] Translated using Weblate (Spanish (Argentina)) Currently translated at 100.0% (4 of 4 strings) Translation: field-service-14.0/field-service-14.0-fieldservice_sale_stock Translate-URL: https://translation.odoo-community.org/projects/field-service-14-0/field-service-14-0-fieldservice_sale_stock/es_AR/ --- fieldservice_sale_stock/i18n/es_AR.po | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/fieldservice_sale_stock/i18n/es_AR.po b/fieldservice_sale_stock/i18n/es_AR.po index 4f818dfcfb..32aeda2c31 100644 --- a/fieldservice_sale_stock/i18n/es_AR.po +++ b/fieldservice_sale_stock/i18n/es_AR.po @@ -6,30 +6,32 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server 14.0\n" "Report-Msgid-Bugs-To: \n" -"Last-Translator: Automatically generated\n" +"PO-Revision-Date: 2021-10-03 21:34+0000\n" +"Last-Translator: Ignacio Buioli \n" "Language-Team: none\n" "Language: es_AR\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" "Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 4.3.2\n" #. module: fieldservice_sale_stock #: model:ir.model.fields,field_description:fieldservice_sale_stock.field_sale_order__display_name msgid "Display Name" -msgstr "" +msgstr "Mostrar Nombre" #. module: fieldservice_sale_stock #: model:ir.model.fields,field_description:fieldservice_sale_stock.field_sale_order__id msgid "ID" -msgstr "" +msgstr "ID" #. module: fieldservice_sale_stock #: model:ir.model.fields,field_description:fieldservice_sale_stock.field_sale_order____last_update msgid "Last Modified on" -msgstr "" +msgstr "Última Modificación el" #. module: fieldservice_sale_stock #: model:ir.model,name:fieldservice_sale_stock.model_sale_order msgid "Sales Order" -msgstr "" +msgstr "Pedidos de Venta" From 7817a20197bf9559c9a0a6a8f90ccfe9988fe6a9 Mon Sep 17 00:00:00 2001 From: ShwetaSerpentCS Date: Tue, 1 Nov 2022 19:06:09 +0530 Subject: [PATCH 22/35] [FIX] pre-commit. --- fieldservice_sale_stock/__manifest__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fieldservice_sale_stock/__manifest__.py b/fieldservice_sale_stock/__manifest__.py index ffb310a536..6dbd26a4eb 100644 --- a/fieldservice_sale_stock/__manifest__.py +++ b/fieldservice_sale_stock/__manifest__.py @@ -3,7 +3,7 @@ { "name": "Field Service - Sale Stock", - "version": "14.0.1.0.0", + "version": "15.0.1.0.0", "summary": "Sell stockable items linked to field service orders.", "category": "Field Service", "author": "Brian McMaster, Odoo Community Association (OCA)", From 15ac79139fde4cc44de3302f28a58a654915a740 Mon Sep 17 00:00:00 2001 From: ShwetaSerpentCS Date: Wed, 2 Nov 2022 10:56:45 +0530 Subject: [PATCH 23/35] [MIG] fieldservice_sale_stock --- fieldservice_sale_stock/models/sale_order.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fieldservice_sale_stock/models/sale_order.py b/fieldservice_sale_stock/models/sale_order.py index 7305e15f75..cf97b6e4d5 100644 --- a/fieldservice_sale_stock/models/sale_order.py +++ b/fieldservice_sale_stock/models/sale_order.py @@ -19,7 +19,7 @@ def prepare_fsm_values_for_stock_picking(self, fsm_order): def _link_pickings_to_fsm(self): for rec in self: # TODO: We may want to split the picking to have one picking - # per FSM order + # per FSM order fsm_order = self.env["fsm.order"].search( [ ("sale_id", "=", rec.id), From e6c2e94d17ae8b8e7b8de18f7ff58947324e95e9 Mon Sep 17 00:00:00 2001 From: oca-ci Date: Wed, 2 Nov 2022 14:41:27 +0000 Subject: [PATCH 24/35] [UPD] Update fieldservice_sale_stock.pot --- .../i18n/fieldservice_sale_stock.pot | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/fieldservice_sale_stock/i18n/fieldservice_sale_stock.pot b/fieldservice_sale_stock/i18n/fieldservice_sale_stock.pot index 6570a9956a..2a7b5238d7 100644 --- a/fieldservice_sale_stock/i18n/fieldservice_sale_stock.pot +++ b/fieldservice_sale_stock/i18n/fieldservice_sale_stock.pot @@ -4,7 +4,7 @@ # msgid "" msgstr "" -"Project-Id-Version: Odoo Server 14.0\n" +"Project-Id-Version: Odoo Server 15.0\n" "Report-Msgid-Bugs-To: \n" "Last-Translator: \n" "Language-Team: \n" @@ -13,21 +13,6 @@ msgstr "" "Content-Transfer-Encoding: \n" "Plural-Forms: \n" -#. module: fieldservice_sale_stock -#: model:ir.model.fields,field_description:fieldservice_sale_stock.field_sale_order__display_name -msgid "Display Name" -msgstr "" - -#. module: fieldservice_sale_stock -#: model:ir.model.fields,field_description:fieldservice_sale_stock.field_sale_order__id -msgid "ID" -msgstr "" - -#. module: fieldservice_sale_stock -#: model:ir.model.fields,field_description:fieldservice_sale_stock.field_sale_order____last_update -msgid "Last Modified on" -msgstr "" - #. module: fieldservice_sale_stock #: model:ir.model,name:fieldservice_sale_stock.model_sale_order msgid "Sales Order" From b37c96f2d24a4bb98dbf707ce7284e29626bb218 Mon Sep 17 00:00:00 2001 From: OCA-git-bot Date: Wed, 2 Nov 2022 14:45:45 +0000 Subject: [PATCH 25/35] [UPD] README.rst --- fieldservice_sale_stock/README.rst | 10 +++++----- fieldservice_sale_stock/static/description/index.html | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/fieldservice_sale_stock/README.rst b/fieldservice_sale_stock/README.rst index 5b271750fa..b98ad78e6e 100644 --- a/fieldservice_sale_stock/README.rst +++ b/fieldservice_sale_stock/README.rst @@ -14,13 +14,13 @@ Field Service - Sale Stock :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html :alt: License: AGPL-3 .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Ffield--service-lightgray.png?logo=github - :target: https://github.com/OCA/field-service/tree/14.0/fieldservice_sale_stock + :target: https://github.com/OCA/field-service/tree/15.0/fieldservice_sale_stock :alt: OCA/field-service .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png - :target: https://translation.odoo-community.org/projects/field-service-14-0/field-service-14-0-fieldservice_sale_stock + :target: https://translation.odoo-community.org/projects/field-service-15-0/field-service-15-0-fieldservice_sale_stock :alt: Translate me on Weblate .. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png - :target: https://runbot.odoo-community.org/runbot/264/14.0 + :target: https://runbot.odoo-community.org/runbot/264/15.0 :alt: Try me on Runbot |badge1| |badge2| |badge3| |badge4| |badge5| @@ -76,7 +76,7 @@ Bug Tracker Bugs are tracked on `GitHub 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 `_. +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -122,6 +122,6 @@ Current `maintainers `__: |maintainer-wolfhall| |maintainer-max3903| |maintainer-brian10048| -This module is part of the `OCA/field-service `_ project on GitHub. +This module is part of the `OCA/field-service `_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/fieldservice_sale_stock/static/description/index.html b/fieldservice_sale_stock/static/description/index.html index f4f33e39a9..6d628c1db3 100644 --- a/fieldservice_sale_stock/static/description/index.html +++ b/fieldservice_sale_stock/static/description/index.html @@ -367,7 +367,7 @@

    Field Service - Sale Stock

    !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> -

    Beta License: AGPL-3 OCA/field-service Translate me on Weblate Try me on Runbot

    +

    Beta License: AGPL-3 OCA/field-service Translate me on Weblate Try me on Runbot

    This module links pickings created by a sale order to the field service order created by the sale order.

    Table of contents

    @@ -426,7 +426,7 @@

    Bug Tracker

    Bugs are tracked on GitHub 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.

    +feedback.

    Do not contact contributors directly about support or help with technical issues.

    @@ -454,7 +454,7 @@

    Maintainers

    promote its widespread use.

    Current maintainers:

    wolfhall max3903 brian10048

    -

    This module is part of the OCA/field-service project on GitHub.

    +

    This module is part of the OCA/field-service project on GitHub.

    You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

    From aaf22dbfdfd3e301158761b28a7f4c868c75d0ab Mon Sep 17 00:00:00 2001 From: Weblate Date: Wed, 2 Nov 2022 16:21:29 +0000 Subject: [PATCH 26/35] Update translation files Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: field-service-15.0/field-service-15.0-fieldservice_sale_stock Translate-URL: https://translation.odoo-community.org/projects/field-service-15-0/field-service-15-0-fieldservice_sale_stock/ --- fieldservice_sale_stock/i18n/es.po | 9 ++++++--- fieldservice_sale_stock/i18n/es_AR.po | 24 +++++++++--------------- fieldservice_sale_stock/i18n/es_CL.po | 9 ++++++--- fieldservice_sale_stock/i18n/it.po | 24 +++++++++--------------- fieldservice_sale_stock/i18n/pt_BR.po | 9 ++++++--- 5 files changed, 36 insertions(+), 39 deletions(-) diff --git a/fieldservice_sale_stock/i18n/es.po b/fieldservice_sale_stock/i18n/es.po index d770f84b27..1614ce135d 100644 --- a/fieldservice_sale_stock/i18n/es.po +++ b/fieldservice_sale_stock/i18n/es.po @@ -1,6 +1,6 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: -# * fieldservice_sale_stock +# * fieldservice_sale_stock # msgid "" msgstr "" @@ -18,5 +18,8 @@ msgstr "" #. module: fieldservice_sale_stock #: model:ir.model,name:fieldservice_sale_stock.model_sale_order -msgid "Sale Order" -msgstr "Pedido de Venta" +msgid "Sales Order" +msgstr "" + +#~ msgid "Sale Order" +#~ msgstr "Pedido de Venta" diff --git a/fieldservice_sale_stock/i18n/es_AR.po b/fieldservice_sale_stock/i18n/es_AR.po index 32aeda2c31..4a123b7924 100644 --- a/fieldservice_sale_stock/i18n/es_AR.po +++ b/fieldservice_sale_stock/i18n/es_AR.po @@ -16,22 +16,16 @@ msgstr "" "Plural-Forms: nplurals=2; plural=n != 1;\n" "X-Generator: Weblate 4.3.2\n" -#. module: fieldservice_sale_stock -#: model:ir.model.fields,field_description:fieldservice_sale_stock.field_sale_order__display_name -msgid "Display Name" -msgstr "Mostrar Nombre" - -#. module: fieldservice_sale_stock -#: model:ir.model.fields,field_description:fieldservice_sale_stock.field_sale_order__id -msgid "ID" -msgstr "ID" - -#. module: fieldservice_sale_stock -#: model:ir.model.fields,field_description:fieldservice_sale_stock.field_sale_order____last_update -msgid "Last Modified on" -msgstr "Última Modificación el" - #. module: fieldservice_sale_stock #: model:ir.model,name:fieldservice_sale_stock.model_sale_order msgid "Sales Order" msgstr "Pedidos de Venta" + +#~ msgid "Display Name" +#~ msgstr "Mostrar Nombre" + +#~ msgid "ID" +#~ msgstr "ID" + +#~ msgid "Last Modified on" +#~ msgstr "Última Modificación el" diff --git a/fieldservice_sale_stock/i18n/es_CL.po b/fieldservice_sale_stock/i18n/es_CL.po index a7d49c435b..467b8cb450 100644 --- a/fieldservice_sale_stock/i18n/es_CL.po +++ b/fieldservice_sale_stock/i18n/es_CL.po @@ -1,6 +1,6 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: -# * fieldservice_sale_stock +# * fieldservice_sale_stock # msgid "" msgstr "" @@ -18,5 +18,8 @@ msgstr "" #. module: fieldservice_sale_stock #: model:ir.model,name:fieldservice_sale_stock.model_sale_order -msgid "Sale Order" -msgstr "Nota de Venta" +msgid "Sales Order" +msgstr "" + +#~ msgid "Sale Order" +#~ msgstr "Nota de Venta" diff --git a/fieldservice_sale_stock/i18n/it.po b/fieldservice_sale_stock/i18n/it.po index 05f0ff5134..4a7319bd81 100644 --- a/fieldservice_sale_stock/i18n/it.po +++ b/fieldservice_sale_stock/i18n/it.po @@ -16,22 +16,16 @@ msgstr "" "Plural-Forms: nplurals=2; plural=n != 1;\n" "X-Generator: Weblate 4.3.2\n" -#. module: fieldservice_sale_stock -#: model:ir.model.fields,field_description:fieldservice_sale_stock.field_sale_order__display_name -msgid "Display Name" -msgstr "Nome visualizzato" - -#. module: fieldservice_sale_stock -#: model:ir.model.fields,field_description:fieldservice_sale_stock.field_sale_order__id -msgid "ID" -msgstr "ID" - -#. module: fieldservice_sale_stock -#: model:ir.model.fields,field_description:fieldservice_sale_stock.field_sale_order____last_update -msgid "Last Modified on" -msgstr "Ultima modifica il" - #. module: fieldservice_sale_stock #: model:ir.model,name:fieldservice_sale_stock.model_sale_order msgid "Sales Order" msgstr "Ordine vendite" + +#~ msgid "Display Name" +#~ msgstr "Nome visualizzato" + +#~ msgid "ID" +#~ msgstr "ID" + +#~ msgid "Last Modified on" +#~ msgstr "Ultima modifica il" diff --git a/fieldservice_sale_stock/i18n/pt_BR.po b/fieldservice_sale_stock/i18n/pt_BR.po index 05e1e13821..d261018e41 100644 --- a/fieldservice_sale_stock/i18n/pt_BR.po +++ b/fieldservice_sale_stock/i18n/pt_BR.po @@ -1,6 +1,6 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: -# * fieldservice_sale_stock +# * fieldservice_sale_stock # msgid "" msgstr "" @@ -18,5 +18,8 @@ msgstr "" #. module: fieldservice_sale_stock #: model:ir.model,name:fieldservice_sale_stock.model_sale_order -msgid "Sale Order" -msgstr "Pedido de Venda" +msgid "Sales Order" +msgstr "" + +#~ msgid "Sale Order" +#~ msgstr "Pedido de Venda" From 9ffdf8e4972b121f2a2b0bbfe02dd8ec15cf9f28 Mon Sep 17 00:00:00 2001 From: Francesco Foresti Date: Wed, 18 Jan 2023 09:18:12 +0000 Subject: [PATCH 27/35] Translated using Weblate (Italian) Currently translated at 100.0% (1 of 1 strings) Translation: field-service-15.0/field-service-15.0-fieldservice_sale_stock Translate-URL: https://translation.odoo-community.org/projects/field-service-15-0/field-service-15-0-fieldservice_sale_stock/it/ --- fieldservice_sale_stock/i18n/it.po | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/fieldservice_sale_stock/i18n/it.po b/fieldservice_sale_stock/i18n/it.po index 4a7319bd81..bcf3986725 100644 --- a/fieldservice_sale_stock/i18n/it.po +++ b/fieldservice_sale_stock/i18n/it.po @@ -6,20 +6,20 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server 14.0\n" "Report-Msgid-Bugs-To: \n" -"PO-Revision-Date: 2021-09-29 10:34+0000\n" -"Last-Translator: mymage \n" +"PO-Revision-Date: 2023-01-18 11:48+0000\n" +"Last-Translator: Francesco Foresti \n" "Language-Team: none\n" "Language: it\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 4.3.2\n" +"X-Generator: Weblate 4.14.1\n" #. module: fieldservice_sale_stock #: model:ir.model,name:fieldservice_sale_stock.model_sale_order msgid "Sales Order" -msgstr "Ordine vendite" +msgstr "Ordine di vendita" #~ msgid "Display Name" #~ msgstr "Nome visualizzato" From b7361e002221a45da60930d78d7dce04db5e3a00 Mon Sep 17 00:00:00 2001 From: OCA-git-bot Date: Sun, 3 Sep 2023 12:53:52 +0000 Subject: [PATCH 28/35] [UPD] README.rst --- fieldservice_sale_stock/README.rst | 15 +++--- .../static/description/index.html | 52 ++++++++++--------- 2 files changed, 36 insertions(+), 31 deletions(-) diff --git a/fieldservice_sale_stock/README.rst b/fieldservice_sale_stock/README.rst index b98ad78e6e..ab46e82919 100644 --- a/fieldservice_sale_stock/README.rst +++ b/fieldservice_sale_stock/README.rst @@ -2,10 +2,13 @@ Field Service - Sale Stock ========================== -.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:79b2ebd814e338db117d7a794d0f8e2d75bca0b9e3de054471fdcad061c2cc48 + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png :target: https://odoo-community.org/page/development-status @@ -19,11 +22,11 @@ Field Service - Sale Stock .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png :target: https://translation.odoo-community.org/projects/field-service-15-0/field-service-15-0-fieldservice_sale_stock :alt: Translate me on Weblate -.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png - :target: https://runbot.odoo-community.org/runbot/264/15.0 - :alt: Try me on Runbot +.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png + :target: https://runboat.odoo-community.org/builds?repo=OCA/field-service&target_branch=15.0 + :alt: Try me on Runboat -|badge1| |badge2| |badge3| |badge4| |badge5| +|badge1| |badge2| |badge3| |badge4| |badge5| This module links pickings created by a sale order to the field service order created by the sale order. @@ -75,7 +78,7 @@ Bug Tracker Bugs are tracked on `GitHub 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 +If you spotted it first, help us to smash it by providing a detailed and welcomed `feedback `_. Do not contact contributors directly about support or help with technical issues. diff --git a/fieldservice_sale_stock/static/description/index.html b/fieldservice_sale_stock/static/description/index.html index 6d628c1db3..7c0a7e478e 100644 --- a/fieldservice_sale_stock/static/description/index.html +++ b/fieldservice_sale_stock/static/description/index.html @@ -1,20 +1,20 @@ - + - + Field Service - Sale Stock \ No newline at end of file diff --git a/fieldservice_sale_stock/static/description/index.html b/fieldservice_sale_stock/static/description/index.html index 02ce32954b..1c66480d8e 100644 --- a/fieldservice_sale_stock/static/description/index.html +++ b/fieldservice_sale_stock/static/description/index.html @@ -369,7 +369,7 @@

    Field Service - Sale Stock

    !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! source digest: sha256:da03ba406dbbaf50ca1b793439af169e4b0fdfb8d687ef8202ba7625051b113b !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> -

    Beta License: AGPL-3 OCA/field-service Translate me on Weblate Try me on Runboat

    +

    Beta License: AGPL-3 OCA/field-service Translate me on Weblate Try me on Runboat

    This module links pickings created by a sale order to the field service order created by the sale order.

    Table of contents

    @@ -422,7 +422,7 @@

    Bug Tracker

    Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us to smash it by providing a detailed and welcomed -feedback.

    +feedback.

    Do not contact contributors directly about support or help with technical issues.

    @@ -453,7 +453,7 @@

    Maintainers

    promote its widespread use.

    Current maintainers:

    wolfhall max3903 brian10048

    -

    This module is part of the OCA/field-service project on GitHub.

    +

    This module is part of the OCA/field-service project on GitHub.

    You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.