Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

[14.0] [MIG] sale_report_hide_price: Module migrated in v14. #516

Merged
Changes from 1 commit
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
97b7137
[ADD] : sale_report_hide_price module
JayVora-SerpentCS Aug 12, 2016
01b2d0c
[REF] : sale_report_hide_price module
JayVora-SerpentCS Aug 12, 2016
733879c
[REF]
JayVora-SerpentCS Dec 16, 2016
7112f38
PEP8 fixes
JayVora-SerpentCS Dec 28, 2016
7e67e22
fixed hide price module
JayVora-SerpentCS Jan 10, 2017
eda8033
[IMP/ADD]Fixed Travis.
hpatelserpentcs May 6, 2017
48524ae
[IMP/ADD]Added Test Case.
hpatelserpentcs May 10, 2017
152dc00
[IMP/ADD]Added partner_credit_limit module.
hpatelserpentcs May 11, 2017
2ec6158
[FIX]Travis Fixed.
hpatelserpentcs May 11, 2017
febef98
added banners
hda May 30, 2017
962ec32
fixed summary
hda Aug 3, 2017
9f9b122
[ADD] Migrated sale_report_hide_price module in v11.
sudhir-serpentcs Nov 3, 2017
e066b7a
[IMP]made improvements, fix travis errors
Arpit-SerpentCS Jan 25, 2018
248ee08
[IMP] add solve travis error
Arpit-SerpentCS Jan 25, 2018
1a5956b
[IMP]made improvemnts in sale report hide and base model
Arpit-SerpentCS Jan 29, 2018
4b75233
[ADD]improvements in js files and added redme.rst file
Arpit-SerpentCS Jan 29, 2018
ff78935
[IMP]removed encoding utf-8 from py files
Arpit-SerpentCS Jan 29, 2018
6f89ce7
[IMP]remove description key in manifest file and improvements in js file
Arpit-SerpentCS Jan 30, 2018
431e771
[IMP] improvements in manifest file
Arpit-SerpentCS Jan 30, 2018
5b27076
[FIX]Fixed travis error and added README.rst file.
shobhapadasalagi Feb 15, 2018
eaab41f
[IMP]Improved License file year.
shobhapadasalagi Feb 20, 2018
7830db8
[IMP]solve travis
Arpit-SerpentCS Mar 13, 2018
121ba47
[IMP]improved index for sale_report_hide_price
NishaGajjar-SerpentCS May 8, 2018
209b82d
[12.0][MIG] Migrated sale_report_hide_price
Chanakya-SerpentCS Dec 24, 2018
e07dc9e
[MIG] Migrated the module in v13.
HarshK-SerpentCS Oct 7, 2019
a6ce7e3
[MIG] Migrated the module in v13.
HarshK-SerpentCS Oct 8, 2019
6d6e4c2
[IMP][13.0] Improved code.
mohil24 Apr 22, 2020
b94470c
[13.0][IMP] sale_report_hide_price : Fixed the travis issue.
RiddhiChavda22 Jun 24, 2020
d41c3f4
[MIG] Migrated the module in v14.
Chandresh-SerpentCS Nov 10, 2020
6ee98cc
[IMP] sale_report_hide_price:improve the comments
pragati-patel98 Dec 10, 2020
820133b
[IMP] sale_report_hide_price : improve the code
pragati-patel98 Dec 11, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
[13.0][IMP] sale_report_hide_price : Fixed the travis issue.
RiddhiChavda22 authored and Chandresh-SerpentCS committed Nov 10, 2020

Verified

This commit was signed with the committer’s verified signature.
rooftopcellist Christian Adams
commit b94470c2d45b2c648367c47b90286a1372531c9e
1 change: 0 additions & 1 deletion sale_report_hide_price/LICENSE/LICENSE
Original file line number Diff line number Diff line change
@@ -14,4 +14,3 @@

You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.

1 change: 0 additions & 1 deletion sale_report_hide_price/README.rst
Original file line number Diff line number Diff line change
@@ -42,4 +42,3 @@ promote its widespread use.

To contribute to this module, please visit http://odoo-community.org.
* Serpent Consulting Services Pvt. Ltd. <support@serpentcs.com>

32 changes: 15 additions & 17 deletions sale_report_hide_price/__manifest__.py
Original file line number Diff line number Diff line change
@@ -1,22 +1,20 @@
# See LICENSE file for full copyright and licensing details.

{
'name': 'Hide Price and Discount in Quotation Report',
'author': 'Serpent Consulting Services Pvt. Ltd.',
'maintainer': 'Serpent Consulting Services Pvt. Ltd.',
'category': 'Sales Management',
'website': 'http://www.serpentcs.com',
'version': '13.0.1.0.1',
'license': 'AGPL-3',
'summary': 'Hide price/discount in Sale Order Report',
'depends': [
'sale'
"name": "Hide Price and Discount in Quotation Report",
"author": "Serpent Consulting Services Pvt. Ltd.",
"maintainer": "Serpent Consulting Services Pvt. Ltd.",
"category": "Sales Management",
"website": "http://www.serpentcs.com",
"version": "13.0.1.0.1",
"license": "AGPL-3",
"summary": "Hide price/discount in Sale Order Report",
"depends": ["sale"],
"images": ["static/description/icon.png"],
"data": [
"views/sale_view.xml",
"views/report_saleorder.xml",
"views/preview_sale_order.xml",
],
'images': ['static/description/icon.png'],
'data': [
'views/sale_view.xml',
'views/report_saleorder.xml',
'views/preview_sale_order.xml'
],
'installable': True,
"installable": True,
}
2 changes: 1 addition & 1 deletion sale_report_hide_price/models/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# See LICENSE file for full copyright and licensing details.

from . import sale
from . import sale
13 changes: 8 additions & 5 deletions sale_report_hide_price/models/sale.py
Original file line number Diff line number Diff line change
@@ -4,13 +4,16 @@


class SaleOrder(models.Model):
_inherit = 'sale.order'
_inherit = "sale.order"

show_price = fields.Boolean(
'Show Price',
"Show Price",
help="If checked, you can see the price in "
"report of" "Sales Order / Quotation.")
"report of"
"Sales Order / Quotation.",
)
show_discount = fields.Boolean(
'Show Discount',
"Show Discount",
help="If checked, you can see the discount"
" in report of Sales Order/Quotation.")
" in report of Sales Order/Quotation.",
)

Choose a reason for hiding this comment

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

@ForamSerpentCS We should have this feature linked with Security groups.
These fields should be seen by ACCOUNT Manager (or top account group).

Choose a reason for hiding this comment

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

Yes we may, If we can have security groups for it, then we can manage this feature directly applying field security in template.

2 changes: 1 addition & 1 deletion sale_report_hide_price/static/description/index.html
Original file line number Diff line number Diff line change
@@ -272,4 +272,4 @@ <h2 class="oe_slogan" style="font-family:times new roman;color:#875A7B;margin-to
</table>

</body>
</html>
</html>
42 changes: 26 additions & 16 deletions sale_report_hide_price/tests/test_sale.py
Original file line number Diff line number Diff line change
@@ -4,25 +4,35 @@


class SaleOrderTest(common.TransactionCase):

def setup(self):
super(SaleOrderTest, self).setup()
return super(SaleOrderTest, self).setup()

def test_saleorder_action(self):
self.sale_order = self.env['sale.order']
self.partner = self.env.ref('base.res_partner_2')
self.sale_order = self.env["sale.order"]
self.partner = self.env.ref("base.res_partner_2")
self.products = {
'serv_order': self.env.ref('product.service_order_01'),
'serv_deli': self.env.ref('product.service_delivery'),
"serv_order": self.env.ref("product.service_order_01"),
"serv_deli": self.env.ref("product.service_delivery"),
}

self.order_idA = self.sale_order.create({
'partner_id': self.partner.id,
'show_price': True,
'show_discount': True,
'order_line': [
(0, 0, {'name': p.name, 'product_id': p.id,
'product_uom_qty': 2, 'product_uom': p.uom_id.id,
'price_unit': p.list_price
})for (_, p) in self.products.items()],
})
self.order_idA = self.sale_order.create(
{
"partner_id": self.partner.id,
"show_price": True,
"show_discount": True,
"order_line": [
(
0,
0,
{
"name": p.name,
"product_id": p.id,
"product_uom_qty": 2,
"product_uom": p.uom_id.id,
"price_unit": p.list_price,
},
)
for (_, p) in self.products.items()
],
}
)