Skip to content

[MIG] 12.0-claim_from_delivery - #4

Open
MPishpecki wants to merge 1 commit into
12.0from
12.0-claim_from_delivery
Open

[MIG] 12.0-claim_from_delivery#4
MPishpecki wants to merge 1 commit into
12.0from
12.0-claim_from_delivery

Conversation

@MPishpecki

Copy link
Copy Markdown

No description provided.

@MPishpecki

Copy link
Copy Markdown
Author

After long time struggling I as able only to add a module without history

@MPishpecki
MPishpecki requested a review from StefanRijnhart May 28, 2020 12:51
@MPishpecki

Copy link
Copy Markdown
Author

I will add test here.
I don't know what to do with that translation folder. Should I regenerate it or something.

Comment thread claim_from_delivery/__manifest__.py Outdated
"author": "Vanmoof BV, OpenERP SA",
"category": "Warehouse Management",
"depends": ["base", "crm_claim", "stock"],
"license": "AGPL-3",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Odoo 9.0 was already relicensed as LGPL-3 so we need to go with that.

Comment thread claim_from_delivery/__manifest__.py Outdated
{
"name": "Claim on Deliveries",
"version": "12.0.1.0.0",
"author": "Vanmoof BV, OpenERP SA",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

In order of appearance ;-)

OpenERP SA,Vanmoof BV,Odoo Community Association (OCA)

@@ -0,0 +1,4 @@
* Stefan Rijnhart <stefan@opener.amsterdam> (https://opener.amsterdam)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I didn't do anything! You can remove me from this bit

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Would be nice if you could list the committers on the module from the Odoo tree though.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

CREDITS.rst is an empty file below, so Github won't let me comment on it, but can you add the disclaimer from OCA/crm@8078fc9#diff-7a2d2e4fa90e6191ec005372e4b17018R47-R49?

Comment thread claim_from_delivery/__manifest__.py Outdated
@@ -0,0 +1,16 @@
# © 2020 Vanmoof BV (<https://www.vanmoof.com>)
# © 2004-2009 Tiny SPRL (<http://tiny.be>)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

To be precise, I see code changes up until 2015 in odoo/9.0, and Tiny SPRL is currently Odoo SA

Comment thread claim_from_delivery/__manifest__.py Outdated
"version": "12.0.1.0.0",
"author": "Vanmoof BV, OpenERP SA",
"category": "Warehouse Management",
"depends": ["base", "crm_claim", "stock"],

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

base is redundant

<?xml version="1.0"?>
<odoo>

<record model="res.request.link" id="request_link_claim_from_delivery">

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Obsolete file (you already removed it from the manifest file.

class StockPicking(models.Model):
_inherit = 'stock.picking'

@api.model

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

@api.multi

@api.model
def _claim_count_out(self):
"""
Count number of calims ralted to stock pickings

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

typos: claims, related

def _claim_count_out(self):
"""
Count number of calims ralted to stock pickings
:return: dict( picking.id: number of claims)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

No return value in this version anymore

[('model_ref_id', '=', 'stock.picking,{}'.format(pick.id))])

claim_count_out = fields.Integer(
compute="_claim_count_out", string="Claims")

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

See https://github.com/OCA/odoo-community.org/blob/master/website/Contribution/CONTRIBUTING.rst#models (and maybe it's good to reread this whole document): the compute method pattern is _compute_<field_name>

@MPishpecki

Copy link
Copy Markdown
Author

Did I get all of the comments?

@MPishpecki
MPishpecki force-pushed the 12.0-claim_from_delivery branch from 1b35c88 to 765f648 Compare June 5, 2020 15:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants