Project introduction
Repository
https://github.com/boxwise/boxwise_WMS
What is Boxwise?
As stated in project's README file, Boxwise is a web-app, which makes it easy for organisations to source, store and distribute donated goods to people in need in a fair and dignified way.
How it works?
I'd just repeat myself here as I've already did my best to sum it up in couple of sentences in my first contribution post. You can find it HERE
Why did I join the project?
I've explained this also in my previous post. Again, just click HERE to find out.


Tech talk
I've lately creaeted 3 tiny pull request which is actually always a success with Odoo. I somehow can't get my head around this tech so far..
- Random box ID generator
- User groups and settings to hide not needed menus from users
- "First created box" message shown twice
Task1: Random box ID
- My pull request: HERE
- Detailed task description: Feature request #24
- Language: Python
- Commits: 2
- My additions: 70 (cumulative commit by commit - 77)
- My deletions: 0 (cumulative commit by commit - 15)
- Comment: This pull request was approve while guys were in Greece. James also found the way how to modify the domain_force field of a record - read: force my new random Id to be a default option for packages . He added ir.sequence.xml which does the job (line 18 is the important one)
As last time, I guess the best way how to show what I've done is GIF, right?

As always with Odoo, it was an adventure. But on the other side, I've also understood why modularity of Odoo is such a cool and useful thing. Packages we're using are actually coming from ir.stock package and package id is implemented in ir.sequence class. I knew I'll have to extend the ir.sequence class. I've opened ir.stock package code and quickly find out how to inherit from their classes and added my own random ID option to the dropdown.
_inherit = 'ir.sequence'
implementation = fields.Selection([('standard', 'Standard'), ('no_gap', 'No gap'), ('random_id', 'Random ID')],
The real question was which methods do I need to overwrite. There was _next(), _nextId(), _doNext() and some more with similar names. Chrome DevTools came to my rescue once again :D In Network tab, I've checked which requests and server methods are called upon creating a new package and seen that _next() is the method which is responsible for deciding which type of id should be generated.
def _next(self):
if self.implementation == 'random_id':
return self.generate_random_id() #generate our own random ID
else:
return super(CustomPackageSequence, self)._next() #fallback to superclass sequence
Once I was able to steer the execution to my code generation method, the actuall random ID creation was pretty straightforward. I just needed to ensure it's not already used and if so, just try again. Also, adding prefix and suffix (if configured) should not be forgotten.

Task2: Create user roles & permissions + hide extra menus
- My pull request: HERE
- Detailed task description: Feature request #24
- Language: XML
- Commits: 2
- My additions: 58
- My deletions: 0
- Comment: Again, the PR was adjusted according to Pampiraiki implementation as some onsite unexpected changes were needed

Crucial knowledge here was to find out how to remove permissions from user groups. I've basically found all needed information on this Odoo forum thread. There are 6 various options for adding/replacing values in many2many and one2many fields (permissions are stored as many2many relationships between user groups and permissions)

After finding this out, all I had to do was to define my own 3 groups (Coordinator, Volunteer, Show all menus) and add particular relationships to the menu/submenu items.


Task3: Created and fixed Issue #83
Hah I'm adding this one just so it looks I've done a looot of work altogether. The issue here was that the else logic for user message was not correctly placed. I've found it by total coincidence soo created the issue and immediately also fixed it.
Here's how the bug looked like:
- My pull request: HERE
- Detailed task description: "Created your first box" message shown twice
- Language: XML
- Commits: 1
- My additions: 1
- My deletions: 1

Next steps for Boxwise team
- Continue implementing basic DropApp functionality into Boxwise for the next 3 weeks
- Fly to Athens on first week of April to test new features and get more feedback from volunteers in Pampiraiki warehouse (I'm flying this time as well :O)